case/break bug?
Miguel Lobo
luislm at mundivia.es
Sat Dec 26 23:31:42 CET 1998
Actually, I don't know if it's a bug or a feature, but
apparently in GPC when you use 'break' inside a case
statement the execution jumps to the end of the case.
In Borland Pascal executing break would exit the
enclosing block. For example, in
while ... do
begin
...
case ... of
...: ... break;
end; {case}
end; {while}
when break is executed, the 'while' loop should be stopped.
Of course, this is different from C. I have not found reference
to this 'break' incompatibility in the GPC documentation,
so I thought I should report it, just in case.
More information about the Gpc
mailing list