pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Example 270 $LEN Routine
INT b;
INT a [0:11];
b := $LEN (a); ! Return 2
Example 271 $LEN Routine
INT s_len;
STRUCT .s[0:99];
BEGIN
INT(32) array[0:2];
END;
s_len := $LEN (s); ! Return 12
Example 272 $LEN Routine
INT array_length;
INT(32) array[0:2];
array_length := $LEN (array) * $OCCURS (array);
! Return 12, the length of the entire array in bytes
$LFIX
$LFIX converts an unsigned INT value to a FIXED(fpoint ) value.
NopTAL privileged procedure
NoCan be executed only by privileged procedures
NoSets condition code
NoSets $CARRY
NoSets $OVERFLOW
int-expression
is an unsigned 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.
$LFIX places the INT value in the low-order (least significant) word of the quadrupleword and sets
the three high-order (most significant) words to 0.
Example 273 $LFIX Routine
FIXED(2) fixnum;
INT intnum := 125;
fixnum := $LFIX (intnum, 2); ! Return 1.25
$LMAX
$LMAX returns the maximum of two unsigned INT values.
Nonatomic Operations 323