Flow-control structures: Difference between revisions

Add Nimrod
(Add Nimrod)
Line 951:
...
end fff</lang>
 
=={{header|Nimrod}}==
===Labeled Break & Continue===
Break and continue can be used with block labels to jump out of multiple loops:
<lang nimrod>block outer:
for i in 0..1000:
for j in 0..1000:
if i + j == 3:
break outer</lang>
 
===Try-Except-Finally===
<lang nimrod>var f = open "input.txt"
try:
var s = readLine f
except FReadIO:
echo "An error occured!"
finally:
close f</lang>
 
=={{header|OCaml}}==
Anonymous user