Flow-control structures: Difference between revisions

m
m (→‎{{header|C++}}: lang tag)
m (→‎{{header|Ada}}: lang tag)
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
<lang ada> Outer:
loop
-- do something
Line 18:
exit Outer; -- exits both the inner and outer loops
end loop;
end loop;</lang>
 
=={{header|C}}==