pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

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 Chapter 13 (page 234)); otherwise, $DBLR ignores the problem.
Example 245 $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
$DFIX
$DFIX converts an INT(32) value to a FIXED(fpoint ) value.
NopTAL privileged procedure
NoCan be executed only by privileged procedures
NoSets condition code
NoSets $CARRY
YesSets $OVERFLOW
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.
Example 246 $DFIX Routine
FIXED(2) fixnum;
INT(32) dblnum := -125D;
fixnum := $DFIX (dblnum, 2); ! Return -1.25
$EFLT
$EFLT converts its argument to a REAL(64) value.
302 Built-In Routines