TAL Reference Manual
Standard Functions
TAL Reference Manual—526371-001
14-16
Example of $EFLTR Function
Example of $EFLTR Function
In this example, $EFLTR returns a rounded REAL(64) value from a FIXED(3)
expression:
REAL(64) rndnum; !Declare variables
FIXED(3) fixnum := 12345.678F;
rndnum := $EFLTR (fixnum); !Return rounded REAL(64)
! value
$FIX Function
The $FIX function returns a FIXED(0) value from an INT, INT(32), REAL, or REAL(64)
expression.
expression
is an INT, INT(32), FIXED, REAL, or REAL(64) expression.
Usage Consideration
If expression is too large in magnitude to be represented by a 64-bit two’s complement
integer, $FIX sets the overflow indicator.
Example of $FIX Function
In this example, $FIX returns a FIXED(0) value from an INT expression:
FIXED fixnum; !Declare variables
INT intnum := 5;
fixnum := $FIX (intnum); !Return 5F
$FIXD Function
The $FIXD function returns an INT(32) value from a FIXED(0) expression.
$FIX ( expression
)
VST1413.vsd
$FIXD
(
fixed-expression
)
VST1414.vsd