Flow-control structures: Difference between revisions

→‎goto: Label syntax fixed
(add Ruby)
(→‎goto: Label syntax fixed)
Line 6:
 
===goto===
<lang ada> <<Top:>>
Put_Line("Hello, World");
goto Top;</lang>
 
===exit===
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