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

$INT of a FIXED, REAL, or REAL(64) value
$INT of a FIXED, REAL, or REAL(64) value
$INTR of a FIXED, REAL, or REAL(64) value
$SCALE, for which: 1 <= exponent <= 4
Example 293 $OVERFLOW Routine
I := i + 1;
IF $OVERFLOW THEN ...
For more information about overflow, see Chapter 13 (page 234).
$PARAM
$PARAM checks for the presence or absence of an actual parameter in the call that called the
current procedure or subprocedure.
NopTAL privileged procedure
NoCan be executed only by privileged procedures
NoSets condition code
NoSets $CARRY
NoSets $OVERFLOW
formal-param
is the identifier of a formal parameter as specified in the procedure or subprocedure declaration.
If the actual parameter corresponding to formal-param is present in the CALL statement, $PARAM
returns 1 (not -1 as other Boolean operations do). If the actual parameter is absent from the CALL
statement, $PARAM returns 0.
Only a VARIABLE procedure or subprocedure or an EXTENSIBLE procedure can use $PARAM. If
such a procedure or subprocedure has required parameters, it must check for the presence or
absence of each required parameter in CALL statements. The procedure or subprocedure can also
use $PARAM to check for optional parameters.
Example 294 $PARAM Routine
PROC var_proc (buffer,length,key) VARIABLE;
INT .buffer, length, ! Required parameters
key; ! Optional parameter
BEGIN
...
IF NOT $PARAM (buffer) OR NOT $PARAM (length) THEN RETURN;
! Return 1 or 0 for each required parameter
IF $PARAM (key) THEN ... ;
! Return 1 if optional parameter is present
END;
$POINT
$POINT returns the fpoint value (as an integer) of a FIXED expression.
336 Built-In Routines