pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Example 259 $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
$FLT
$FLT converts its argument to a REAL value.
NopTAL privileged procedure
NoCan be executed only by privileged procedures
NoSets condition code
NoSets $CARRY
NoSets $OVERFLOW
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.
Example 260 $FLT Routine
REAL realnum;
INT(32) dblnum := 147D;
realnum := $FLT (dblnum); ! Return 147E0
$FLTR
$FLTR converts its argument to a REAL value and rounds the result.
NopTAL privileged procedure
NoCan be executed only by privileged procedures
NoSets condition code
NoSets $CARRY
YesSets $OVERFLOW
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.
314 Built-In Routines