Flow-control structures: Difference between revisions

add E description
(add E description)
Line 270:
 
scope (failure) and scope (success) work similarly.
 
=={{header|E}}==
 
E does not have goto. The only primitive flow control construct which is not a loop, conditional, or exception is escape, or ejectors.
 
The basic syntax is
 
escape ''ej'' {
''...body...''
}
 
Within ''body'' variable ''ej'' then contains a one-argument function (an ejector) which, if called, immediately returns the provided value from the escape block.
 
This is a limited form of continuation (it cannot be used after the escape block exits).
 
Loop break, loop continue, and return-from-middle-of-function are all defined in terms of this basic construct.
 
[[Category:E examples needing attention]] <!-- Needs runnable examples, description of escape-catch, and maybe links to other flow control pages -->
 
=={{header|Forth}}==