pTAL Reference Manual (H06.08+)

Built-In Routines
HP pTAL Reference Manual523746-006
15-37
$EFLT
dbl-expression
is an INT(32) expression.
fpoint
is a value in the range -19 through +19 that specifies the position of the implied
decimal point in the result. A positive fpoint specifies the number of decimal
places to the right of the decimal. A negative fpoint specifies the number of
integer places to the left of the decimal point.
$DFIX converts an INT(32) expression to a FIXED(fpoint ) expression by performing
the equivalent of a signed right shift of 32 positions from the left 32 bits into the right 32
bits of a quadrupleword unit.
$EFLT
$EFLT converts its argument to a REAL(64) 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.
Example 15-24. $DFIX Routine
FIXED(2) fixnum;
INT(32) dblnum := -125D;
fixnum := $DFIX (dblnum, 2); ! Return -1.25
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW No
Example 15-25. $EFLT Routine
REAL(64) dbrlnum;
FIXED(3) fixnum := 12345.678F;
dbrlnum := $EFLT (fixnum); ! Return 12345678L-3
expression
( )
VST082.vsd
$EFLT