Flow-control structures: Difference between revisions

Content added Content deleted
No edit summary
Line 545: Line 545:
executable expressions, to be run when current processing is done, even if
executable expressions, to be run when current processing is done, even if
a 'throw' or 'bye' was executed, or an error occurred.
a 'throw' or 'bye' was executed, or an error occurred.

=={{header|PL/I}}==
<lang PL/I>
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.)
</lang>


=={{header|Pop11}}==
=={{header|Pop11}}==