HP Pascal/iX Reference Manual (31502-90022)

3- 7
Standard Procedures
prompt strread
read strwrite
readdir writedir
readln writeln
Example
VAR
left_handed: Boolean;
BEGIN
left_handed := false;
END;
Char.
The
char
type is a predefined ordinal type that is used to represent
individual characters in the 8-bit ASCII character set. A
char literal
is either a single character surrounded by single quote marks, or a sharp
(#) followed by a number or letter.
Permissible Operators
assignment :=
relational <, <=, =, <>, >=, >, IN
Standard Functions
char argument - ord
pred
succ
char return - chr
pred
succ
Standard Procedures
prompt strread
read strwrite
readdir writedir
readln writeln
Example
VAR
do_you: char;
BEGIN
do_you := 'Y';
do_you := #G; { BELL character }
END;
Enumerated.
An
enumerated
type is a user-defined, ordinal type that defines an
ordered set of values by the enumeration of identifiers in parentheses.
The sequence in which the identifiers appear determines the ordering.
The enumerated identifiers are defined as constants. The ORD of the
first has the value zero, and the ORD of the others have successive
integer values in order of their specification. The limit on the maximum
number of identifiers in an enumerated type is implementation dependent.
Refer to the
HP Pascal/iX Programmer's Guide
or the
HP Pascal/HP-UX
Programmer's Guide
, depending on your implementation, for more