Compiler Library/XL Reference Manual (32650-90029)
2- 1
Chapter 2 Mathematical Functions and Procedures
This chapter describes the mathematical functions and procedures in
alphabetical order.
NOTE The function names ending with a prime (EXTIN', for example) can be
called by HP Pascal programs using the ALIAS command with the
EXTERNAL or INTRINSIC statements. For example, here is a
declaration that uses ALIAS with EXTERNAL:
PROCEDURE EXTIN $ALIAS 'EXTIN"' $(
ANYVAR charstring : bytearray;
VAR stringlen : SHORTINT;
decplaces : SHORTINT;
datatype : SHORTINT;
scale : SHORTINT;
delimiters : SHORTINT;
ANYVAR result : INTEGER;
VAR error : SHORTINT
)
EXTERNAL;
The next example illustrates the preferred approach of using ALIAS
with INTRINSIC:
PROCEDURE EXTIN $ALIAS 'EXTIN"'; INTRINSIC;
In HP FORTRAN 77/XL, you must declare routine names with a prime,
as follows:
$ALIAS EXTIN = 'EXTIN"'(%REF, %REF, %VAL, %VAL, %VAL,
%VAL, %REF, %REF)"
AINT (or AINT')
AINT truncates a real number to an integer number in real representation.
Declaration
FUNCTION AINT(x:REAL):REAL; EXTERNAL;
Attributes
Parameter: A real number.
Result: A real number.
HP FORTRAN 77/XL: Intrinsic function: Y=AINT(X).
Error: If the argument is a NaN, there are two
possible actions. If the INVALID trap is
enabled, the message "AINT(X): X=NaN" occurs.
Otherwise, the INVALID flag is set. In either
case, a quiet NaN is returned.