Peter N Lewis wrote:
A lovely feature I added to my own language when I wrote one about a dozen years ago was the construct "not in", eg:
if Ch not in ['A'..'Z'] then ...
I always thought this was much nicer than the ugly:
if not (Ch in ['A'..'Z']) then
as well as much clearer.
I don't know if others agree, but if so it might be a nice extension for GPC.
Anyway, just thought I'd mention it since I happened to be working on the docs for "in" ;-)
It may be pretty to you, but think about the penalties. Even if the parsing could be contorted to fit, any code written with it is immediately incompatible with everything else. Pascal is a portable language. The original syntax was carefully designed for one char and one symbol lookahead. How do you then handle:
if not ch = 'A'; (* illegal *) or if not boolvar <> true; (* legal *)