Flow-control structures: Difference between revisions
m
→exit: Added the loop end name
Flexibeast (talk | contribs) (Add page to "Flow control" category.) |
m (→exit: Added the loop end name) |
||
Line 139:
Exit is used to break out of loops. Exit can be used with a label to break out of an inner loop to an outer loop and its enclosing outer loop
<syntaxhighlight lang="ada">Outer:
loop
loop
-- do something else
▲ -- do something else
▲ exit Outer; -- exits both the inner and outer loops
▲ end loop;</syntaxhighlight>
===asynchronous transfer of control===
A sequence of operation can be aborted with an asynchronous transfer of control to an alternative:
|