pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
$STACK_ALLOCATE does not clear the allocated data area.
$STACK_ALLOCATE does not return error conditions, but stack overflow can occur within
$STACK_ALLOCATE or on a subsequent procedure call from within the procedure that calls
$STACK_ALLOCATE.
When a procedure or routine returns to its caller, the system deallocates all memory allocated by
$STACK_ALLOCATE within that procedure.
pTAL does not support calls to $STACK_ALLOCATE from subprocedures and reports a syntax error
if it encounters one. From within a subprocedure, however, you can reference data in a block
allocated in the encompassing procedure.
Example 307 $STACK_ALLOCATE Routine
INT .p(template);
INT(32) .a;
INT(32) i32;
...
@p := $STACK_ALLOCATE ($LEN(template));
@a := $STACK_ALLOCATE ($LEN(i32) * 10);
For more information about $STACK_ALLOCATE, see the pTAL Conversion Guide.
$TRIGGER
NOTE:
• The TAL and pTAL compilers do not support this routine.
• Execution does not return from this call.
$TRIGGER replaces $FREEZE (page 315) and $HALT (page 315), which are available only for code
generated for the TNS/R architecture.
YespTAL privileged procedure
YesCan be executed only by privileged procedures
NoSets condition code
NoSets $CARRY
NoSets $OVERFLOW
op
is an INT(32) value.
Example 308 $TRIGGER Routine
INT(32) op;
$TRIGGER (op); ! or
call $TRIGGER (op);
$TYPE
$TYPE returns an INT value that represents the data type of a variable.
Nonatomic Operations 345