pTAL Reference Manual (H06.03+)
Built-In Routines
HP pTAL Reference Manual—523746-005
15-49
$FLT
expression
is an INT, INT(32), FIXED, REAL, or REAL(64) expression.
If expression is too large in magnitude to be represented by a 64-bit two’s
complement integer, $FIXR traps if overflow traps are enabled (see Section 13,
Hardware Indicators); otherwise, $FIXR ignores the problem.
$FLT
$FLT converts its argument to a REAL value.
expression
is an INT, INT(32), FIXED(fpoint ), REAL, or REAL(64) expression
If a FIXED expression has a nonzero fpoint, the compiler multiplies or divides the
result by the appropriate power of ten.
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW Yes
Example 15-38. $FIXR Routine
FIXED rfixnum;
REAL(64) bigrealnum := -1.5L0;
FIXED rndfnum;
REAL realnum := 123.456E0;
rfixnum := $FIXR (bigrealnum); ! Return -1F
rndfnum := $FIXR (realnum); ! Return 123F
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW No
expression( )
VST089.vsd
$FLT










