LEAVE statement (Exit statement)
Function
The LEAVE statement exits from a compound statement, the WHILE statement, or the FOR statement, and terminates the execution of those statements.
Format
LEAVE [statement-label]
Operand
Specifies the statement label for the compound statement, WHILE statement, or FOR statement from which control exits, and the execution of which is to be terminated.
If the statement label is omitted, the execution of the innermost compound statement surrounding the LEAVE statement from which the statement label was omitted, the WHILE statement, or the FOR statement is terminated prematurely.
Common rules
Note