pTAL Reference Manual (H06.03+)

Built-In Routines
HP pTAL Reference Manual523746-005
15-36
$DBLR
$DBLR
$DBLR converts its argument to an INT(32) value and rounds the result.
expression
is an INT, INT(32), FIXED, REAL, or REAL(64) expression.
If expression is too large to be represented by a 32-bit two’s complement integer,
$DBLR traps if overflow traps are enabled (see Section 13, Hardware Indicators);
otherwise, $DBLR ignores the problem.
$DFIX
$DFIX converts an INT(32) value to a FIXED(fpoint ) value.
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW No
Example 15-23. $DBLR Routine
REAL r2 := 1.5e0;
INT(32) b32;
REAL realnum := 123.456E0;
INT(32) dblnum;
b32 := $DBLR (r2); ! Return 2d
dblnum := $DBLR (realnum); ! Return 123D
pTAL privileged procedure No
Can be executed only by privileged procedures No
Sets condition code No
Sets $CARRY No
Sets $OVERFLOW Yes
expression( )
VST080.vsd
$DBLR
( )
VST081.vsd
,
$DFIX
dbl-expression fpoint