There's a big difference with a case in Pascal and a case in C:
C behaves like a fall-through (evaluates everything else too, unless break) where Pascal exits when a condition is satisfied.
Hence in C you need to break, whereas in Pascal, you don't need break,
This can be very confusing.
With a fall-through I mean that C evaluates the next cases too, unless break is called.
A pseudo code example would look like this:
case avalue of
0..9:executeAvalue; // if case 0 to nine is satisfied... Execute something...
3: Execute third value; // will be executed in C, provided break is [b]not[/b] called, but not in Pascal. This will never execute in Pascal.
end;
See the point? There is not a one to one relationship between a C (or C++) case and a Pascal case.
In the above case (no break in C) we would solve that with
if then without
else..