TAL Reference Manual

Standard Functions
TAL Reference Manual526371-001
14-23
Example of $INTR Function
If expression is type REAL or REAL(64), $INTR returns a fully converted and rounded
INT value, not a truncation. If the converted value of
expression is too large to be
represented by a 16-bit two’s complement integer, an overflow trap occurs.
Example of $INTR Function
In this example, $INTR returns a fully converted and rounded INT value from a REAL
expression:
INT rndnum; !Declare variables
REAL realnum := 12345E-2;
rndnum := $INTR (realnum); !Return 123
$LADR Function
The $LADR function returns the standard (16-bit) address of a variable that is
accessed through an extended (32-bit) pointer.
variable
is the identifier of a variable accessed through an extended pointer.
Usage Considerations
If variable is a STRING variable or a substructure, $LADR returns a standard byte
address. Otherwise, $LADR returns a standard word address.
When $LADR converts the extended address to a standard address, it loses the
segment number in the extended address:
If the extended address is in the user data segment, the converted address is
correct.
If the extended address is in an extended data segment, the converted address is
incorrect.
(For a description of the extended address format, see Appendix B in the
TAL
Programmer’s Guide.)
$LADR is not portable to future software platforms.
$LADR ( variable
)
VST1424.vsd