Exceptions/Catch an exception thrown in a nested call: Difference between revisions
Exceptions/Catch an exception thrown in a nested call (view source)
Revision as of 23:27, 23 June 2019
, 4 years agoAdded 11l
(Added Rust) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 15:
Show/describe what happens when the program is run.
<br><br>
=={{header|11l}}==
{{trans|Python}}
<lang 11l>T U0 {}
T U1 {}
F baz(i)
I i == 0
X U0()
E
X U1()
F bar(i)
baz(i)
F foo()
L(i) 0..1
X.try
bar(i)
X.catch U0
print(‘Function foo caught exception U0’)
foo()</lang>
=={{header|Ada}}==
Line 108 ⟶ 131:
=={{header|ALGOL 68}}==
{{trans|
{{works with|ALGOL 68|Standard - no extensions to language used}}
|