Re: `case' statments: `default' and `others'
According to richard.kerry@quantel.com:
[`begin/end' after `otherwise' ...] [...] Oh, and the lack of trailing colon is easier as that's the way Oregon has it. Again, if it's optional it doesn't matter.
Just to be sure that I have understood everything correctly: It is okay for you if we drop the colon after `otherwise' (i.e. forbid it) as long as we do not forbid a `begin/end' pair after `otherwise'? So it will be correct to write case foo of 1: writeln ( 'foobar!' ); otherwise writeln ( 'foo?' ); writeln ( 'bar!' ); end (* case *); as well as case foo of 1: writeln ( 'foobar!' ); otherwise begin writeln ( 'foo?' ); writeln ( 'bar!' ); end (* otherwise *); end (* case *); but GPC will reject case foo of 1: writeln ( 'foobar!' ); otherwise: writeln ( 'foo?' ); writeln ( 'bar!' ); end (* case *); or case foo of 1: writeln ( 'foobar!' ); otherwise: begin writeln ( 'foo?' ); writeln ( 'bar!' ); end (* otherwise *); end (* case *); or case foo of otherwise: begin writeln ( 'foo?' ); writeln ( 'bar!' ); end (* otherwise *); 1: writeln ( 'foobar!' ); end (* case *); Greetings, Peter Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [971005] maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [971005]
participants (1)
-
Peter Gerwinski