RosettaCodeData/Task/Flow-control-structures/PL-I/flow-control-structures.pli

30 lines
1.1 KiB
Plaintext

LEAVE
The LEAVE statement terminates execution of a loop.
Execution resumes at the next statement after the loop.
ITERATE
The ITERATE statement causes the next iteration of the loop to
commence. Any statements between ITERATE and the end of the loop
are not executed.
STOP
Terminates execution of either a task or the entire program.
SIGNAL FINISH
Terminates execution of a program in a nice way.
SIGNAL statement
SIGNAL <condition> raises the named condition. The condition may
be one of the hardware or software conditions such as OVERFLOW,
UNDERFLOW, ZERODIVIDE, SUBSCRIPTRANGE, STRINGRANGE, etc, or a
user-defined condition.
CALL
The CALL statement causes control to transfer to the named
subroutine.
SELECT
The SELECT statement permits the execution of just one of a
list of statements (or groups of statements).
It is sort of like a computed GOTO.
GO TO
The GO TO statement causes control to be transferred to the named
statement.
It can also be used to transfer control to any one of an array of
labelled statements. (This form is superseded by SELECT, above.)
[GO TO can also be spelled as GOTO].