Conditional structures: Difference between revisions

Content added Content deleted
m (→‎Match statement: fix small errors)
Line 509: Line 509:


=={{header|Astro}}==
=={{header|Astro}}==
<lang python>if x == 0:
<lang python>if x == 0: foo()
elif x == 1: bar()
foo()
elif x == 1:
elif x == 2: baz()
else: qux()
bar()
elif x == 2:
baz()
else:
qux()


x
x
| 0 -> foo()
| 0 => foo()
| 1 -> bar()
| 1 => bar()
| 2 -> baz()
| 2 => baz()
| _ -> qux()</lang>
| _ => qux()


(a) ? b : c
</lang>


=={{header|AutoHotkey}}==
=={{header|AutoHotkey}}==