[fpc-pascal] New feature: IfThen() intrinsic

Maciej Izak hnb.code at gmail.com
Mon Feb 1 13:33:52 CET 2016


2016-02-01 13:29 GMT+01:00 Michael Van Canneyt <michael at freepascal.org>:

> You missed my point.
>
>
>> &IfThen looks also good (I like shorter syntax &if). With "&" prefix it is
>> obvious that this function is unique.
>>
>
> You misunderstand.
>
> The & character cannot be used as part of an identifier, it is a special
> token.
>
> It is eaten by the scanner. The parser will never see it. You simply
> cannot define "&if' as an identifier. The parser will always see 'if'.
>
> scanner.pas around line 4607.
>
> And modifying the scanner for this exception is a REALLY bad idea.


in that case you are right :)

-- 
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160201/ab14bbf7/attachment.html>


More information about the fpc-pascal mailing list