Peter Wrote :
I am currently fixing the bug with `otherwise' in `case' statements. While the ISO 10206 Extended Pascal standard wants case foo of (* 1 *) bar: writeln ( 'foobar!' ); otherwise write ( 'The answer is: ' ); writeln ( answer ); end (* case *); GPC implemented case foo of (* 2 *) bar: writeln ( 'foobar!' ); otherwise: begin write ( 'The answer is: ' ); writeln ( answer ); end (* otherwise *); end (* case *); which is simply wrong. Okay - when I fix it, does anybody want to keep an optional colon after `otherwise'? Or after `else' in the Borland syntax? (I would prefer if *not*.) --------- surely, since you need begin/end in : case foo of (* 1 *) bar: begin writeln ( 'foobar!' ); writeln ( 'again' ); end;
you should need them in : otherwise: begin write ( 'The answer is: ' ); writeln ( answer ); end (* otherwise *); Having said that, it doesn't matter unless you explicitly stop them being usable there, but since you'd be making it accept statement-list rather than statement it'll still be usable. (I have three-hundred plus modules to convert so I look very carefully at suggestions to restrict the syntax accepted.) 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.
-------------- Peter Wrote :
I also found `default' and `others' as synonyms for `otherwise' which I would like to remove. what about removing `&' as an address operator and to keep only the BP-compatible `@'? -------------- These are ok by me as our Oregon-to-gpc translator can do these either way, and Oregon uses Otherwise.
Richard.