Informatics Practices by Agnelo
LOOP Statements; ... EXIT ... MoreStatements; END LOOP; |
WHILE Cond LOOP Statements; END LOOP; |
FOR Var IN LoVal..HiVal LOOP Statements; END LOOP; |
EXIT WHEN Cond;
is shorthand for
IF Cond THEN EXIT; END IF;
Loops can be named to allow multi-level exits
<<outer>>LOOP
...
<<inner>>LOOP
... EXIT outer WHEN i > 100; ...
END LOOP;
...
END LOOP;