pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Example 155 DO-UNTIL Statement With Hardware Indicator
INT exit_loop;
...
exit_loop := FALSE;
DO
BEGIN
...
READ(...);
IF <> THEN exit_loop := TRUE;
END
UNTIL exit_loop;
Example 156 DO-UNTIL Statement With GOTO Statement
DO
BEGIN
...
READ(...);
IF <> THEN GOTO out;
END
UNTIL false;
out:
...
DROP
The DROP statement removes either a label (from the symbol table) or a temporary variable that
was created by the statement USE (page 232).
identifier
is the identifier of either a label or a temporary variable.
Dropping Labels
You can drop a label only if you have already declared the label or used it to label a statement.
Before you drop a label, be sure there are no further references to the label. If a GOTO statement
refers to a dropped label, a run-time error occurs. After you drop a label, you can, however, use
the identifier to label a statement preceding the GOTO statement that refers to the label.
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.
212 Statements