1 (* Library module defined by the International Standard
2 Information technology - programming languages
3 BS ISO/IEC 10514-1:1996E Part 1: Modula-2, Base Language.
5 Copyright ISO/IEC (International Organization for Standardization
6 and International Electrotechnical Commission) 1996-2021.
8 It may be freely copied for the purpose of implementation (see page
9 707 of the Information technology - Programming languages Part 1:
10 Modula-2, Base Language. BS ISO/IEC 10514-1:1996). *)
12 DEFINITION MODULE CharClass
;
14 (* Classification of values of the type CHAR *)
16 PROCEDURE IsNumeric (ch
: CHAR): BOOLEAN;
17 (* Returns TRUE if and only if ch is classified as a numeric character *)
19 PROCEDURE IsLetter (ch
: CHAR): BOOLEAN;
20 (* Returns TRUE if and only if ch is classified as a letter *)
22 PROCEDURE IsUpper (ch
: CHAR): BOOLEAN;
23 (* Returns TRUE if and only if ch is classified as an upper case letter *)
25 PROCEDURE IsLower (ch
: CHAR): BOOLEAN;
26 (* Returns TRUE if and only if ch is classified as a lower case letter *)
28 PROCEDURE IsControl (ch
: CHAR): BOOLEAN;
29 (* Returns TRUE if and only if ch represents a control function *)
31 PROCEDURE IsWhiteSpace (ch
: CHAR): BOOLEAN;
32 (* Returns TRUE if and only if ch represents a space character or a format effector *)