RosettaCodeData/Task/Conditional-structures/Astro/conditional-structures.astro

17 lines
166 B
Text
Raw Permalink Normal View History

2018-08-17 15:15:24 +01:00
if x == 0:
foo()
elif x == 1:
bar()
elif x == 2:
baz()
else:
qux()
2017-09-23 10:01:46 +02:00
2018-08-17 15:15:24 +01:00
match x:
2019-09-12 10:33:56 -07:00
0 => foo()
1 => bar()
2 => baz()
_ => qux()
2018-06-22 20:57:24 +00:00
(a) ? b : c