Flow-control structures: Difference between revisions
Content added Content deleted
Flexibeast (talk | contribs) (Add page to "Flow control" category.) |
m (→exit: Added the loop end name) |
||
Line 139: | 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 |
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: |
<syntaxhighlight lang="ada">Outer: |
||
loop |
|||
⚫ | |||
loop |
loop |
||
-- do something |
-- do something else |
||
⚫ | |||
end loop; |
|||
⚫ | |||
⚫ | |||
⚫ | |||
end loop; |
|||
⚫ | |||
===asynchronous transfer of control=== |
===asynchronous transfer of control=== |
||
A sequence of operation can be aborted with an asynchronous transfer of control to an alternative: |
A sequence of operation can be aborted with an asynchronous transfer of control to an alternative: |