HP Pascal/iX Reference Manual (31502-90022)

5:- 3
what := false;
lie := NOT true;
IF what = lie THEN writeln('Would I lie?');
END.
Output:
Would I lie?
true
This predefined
Boolean
constant is equal to the
Boolean
value
true
. The
ordinal
value of
true
is 1.
Example
PROGRAM show_true(output);
VAR
what, truth : boolean;
BEGIN
IF true THEN writeln('Always true, always printed.');
what := true;
truth := NOT false;
IF what = truth THEN writeln('Everything I say is a lie.');
END.
Output:
Always true, always printed.
Everything I say is a lie.
maxint
This standard constant returns the upper bound of the integer type. The
value is implementation defined, however, it must allow for at least nine
decimal digits. For more information, see the
HP Pascal/iX Programmer's
Guide
or the
HP Pascal/HP-UX Programmer's Guide
, depending on your
implementation.
Example
PROGRAM show_maxint(input,output);
VAR
i,j : integer;
r : real;
BEGIN
readln(i,j);
r := i + j;
IF r > maxint THEN writeln('Sum too large for integers.');
END.
minint
This standard constant returns the lower bound of the integer type. The
value is implementation defined, however, it must allow at least nine
decimal digits. In general, the range of signed integers allows the
absolute value of
minint
to be greater than
maxint
. For more
information, see the
HP Pascal/iX Programmer's Guide
or the
HP
Pascal/HP-UX Programmer's Guide
, depending on your implementation.
Example
PROGRAM show_minint(input,output);
VAR
i,j : integer;
r : real;
BEGIN
readln(i,j);
r := i - j;
IF r < minint THEN writeln('Difference too large for integers.');
END.