Numbers [ HP Pascal/iX Reference Manual ] MPE/iX 5.0 Documentation
HP Pascal/iX Reference Manual
Numbers
HP Pascal recognizes three kinds of numeric literals: integer, real, and
longreal.
Integer Literals
An integer literal consists of a sequence of digits from the subrange 0
through 9. No spaces may separate the literal, and leading zeroes are
not significant. The compiler interprets unsigned integer literals as
positive values.
The maximum unsigned integer literal is equal in value to the standard
constant maxint. The minimum signed integer literal is equal in value to
the standard constant minint. The actual values of minint and maxint are
implementation dependent; however, at least 9 decimal digits are allowed.
Refer to the HP Pascal/iX Programmer's Guide or the HP Pascal/HP-UX
Programmer's Guide, depending on your implementation, for more
information.
Syntax
Unsigned Integer:
Signed Integer:
Example
100 { unsigned integer }
-100 { signed integer }
Real and Longreal Literals
A real or longreal literal consists of a coefficient and a scale factor.
An E preceding the scale factor is read as times ten to the power of and
specifies a real literal. An L preceding scale factor also means times
ten to the power of, but specifies a longreal literal.
Lowercase e and l are legal. At least one digit must precede and follow
a decimal point. A number containing a decimal point and no scale factor
is considered a real literal.
Syntax
Unsigned Real:
Signed Real:
Example
0.1 { Real with no scale factor. }
5E-3 { Real with no decimal point. }
3.14159265358979L0 { Longreal. }
87.35e+8 { Real. }
MPE/iX 5.0 Documentation