pTAL Reference Manual (H06.08+)
Statements
HP pTAL Reference Manual—523746-006
12-20
Dropping Temporary Variables
Dropping Temporary Variables
When you no longer need a temporary variable, drop (remove) it by using a DROP
statement. After you drop a temporary variable, do not use its identifier without using a
new USE statement to assign a value to the temporary variable.
If you do not drop all temporary variables, the compiler automatically drops them when
the procedure or subprocedure completes execution.
If you reserve an temporary variable for a FOR loop, do not drop the temporary
variable within the scope of the loop.
FOR
The FOR statement is a pretest loop that repeatedly executes a statement while
incrementing or decrementing an index automatically.
index
is a value that increments or decrements automatically.
In Standard on page 12-21, index is the identifier of an INT or INT(32) simple
variable, array element, simple pointer, or structure data item.
In Optimized
on page 12-22, index is the identifier of an index register you have
reserved with the USE
on page 12-45.
initial-value
is an arithmetic expression (such as 0) that initializes index. If index is INT,
initial-value is INT. If index is INT(32), initial-value is INT(32).
TO
increments index each time the loop executes until index is greater than or
equal to limit, at which point the loop stops.
DOWNTO
decrements index each time the loop executes until index is less than or equal
to limit, at which point the loop stops.
FOR
index
:=
initial-value
TO
DOWNTO
limit
BY
step
DO
statement
VST048.vsd










