TAL Reference Manual

Standard Functions
TAL Reference Manual526371-001
14-21
$IFIX Function
$IFIX Function
The $IFIX function returns a FIXED( fpoint) value from a signed INT expression.
int-expression
is a signed INT 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.
Usage Consideration
When $IFIX converts the signed INT expression to a FIXED value, it performs the
equivalent of a signed right shift of 48 positions in a quadrupleword unit.
Example of $IFIX Function
In this example, $IFIX returns a FIXED(2) value from a signed INT expression and an
fpoint of 2:
FIXED(2) fixnum; !Declare variables
INT intnum := 12345;
fixnum := $IFIX (intnum, 2); !Return 123.45
$INT Function
The $INT function returns an INT value from the low-order 16 bits of an INT(32 or
FIXED(0) expression. $INT returns a fully converted INT expression from a REAL or
REAL(64) expression.
expression
is an INT, INT(32), FIXED(0), REAL, or REAL(64) expression.
$IFIX (
fpoint
)
int-expression
,
VST1421.vsd
$INT ( expression
)
VST1422.vsd