RosettaCodeData/Task/Conditional-structures/Pascal/conditional-structures-2.pascal

11 lines
242 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
case i of
1,4,9: { executed if i is 1, 4 or 9 }
DoSomething;
11, 13 .. 17: { executed if i is 11, 13, 14, 15, 16 or 17 }
DoSomethingElse;
42: { executed only if i is 42 }
DoSomeOtherThing;
else
DoYetAnotherThing;
end;