[fpc-devel] weird syntax

Marco van de Voort marcov at stack.nl
Tue Dec 11 09:20:35 CET 2007


> Is it possible to make this work:
> 
> if X > 3 or < 10 then ...
> 
> of course it would be shorthand for: if (X>3) or (X<10) then....
> 
> I suppose also it would be possible then to do:
> 
> if X > 3 or < -1 or = 4000 or = 1000000 then...

Not likely. See e.g. the FAQ about extensions:

http://www.freepascal.org/faq.var#extensionselect

"The extension must have real value. Anything that is only a shorter
notation does not apply, unless it is out of compatibility with an existing
Pascal/Delphi codebase. Practically it means it must make something possible
that can't be done otherwise or be a compability item"

The main reason is that typing is never limiting (and typing optimization can be
better solved with editor templates)



More information about the fpc-devel mailing list