[fpc-devel] weird syntax
Vincent Snijders
vsnijders at quicknet.nl
Tue Dec 11 09:29:25 CET 2007
Andrew Haines schreef:
> Hi,
>
>
> 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....
One way to write this (assuming x is an integer type):
if x in [4..9] then ...
>
> I suppose also it would be possible then to do:
>
> if X > 3 or < -1 or = 4000 or = 1000000 then...
if x in [4..high(integer), low(integer)..-1, 4000, 1000000] then
Vincnet
More information about the fpc-devel
mailing list