| 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. |
| 4 |
|
| 5 |
Copyright ISO/IEC (International Organization for Standardization |
| 6 |
and International Electrotechnical Commission) 1996-2021. |
| 7 |
|
| 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). *) |
| 11 |
|
| 12 |
DEFINITION MODULE CharClass; |
| 13 |
|
| 14 |
(* Classification of values of the type CHAR *) |
| 15 |
|
| 16 |
PROCEDURE IsNumeric (ch: CHAR): BOOLEAN; |
| 17 |
(* Returns TRUE if and only if ch is classified as a numeric character *) |
| 18 |
|
| 19 |
PROCEDURE IsLetter (ch: CHAR): BOOLEAN; |
| 20 |
(* Returns TRUE if and only if ch is classified as a letter *) |
| 21 |
|
| 22 |
PROCEDURE IsUpper (ch: CHAR): BOOLEAN; |
| 23 |
(* Returns TRUE if and only if ch is classified as an upper case letter *) |
| 24 |
|
| 25 |
PROCEDURE IsLower (ch: CHAR): BOOLEAN; |
| 26 |
(* Returns TRUE if and only if ch is classified as a lower case letter *) |
| 27 |
|
| 28 |
PROCEDURE IsControl (ch: CHAR): BOOLEAN; |
| 29 |
(* Returns TRUE if and only if ch represents a control function *) |
| 30 |
|
| 31 |
PROCEDURE IsWhiteSpace (ch: CHAR): BOOLEAN; |
| 32 |
(* Returns TRUE if and only if ch represents a space character or a format effector *) |
| 33 |
|
| 34 |
END CharClass. |
| 35 |
|