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

Maciej Izak hnb.code at gmail.com
Mon Feb 1 13:26:56 CET 2016


2016-02-01 13:15 GMT+01:00 Maciej Izak <hnb.code at gmail.com>:

> 2016-02-01 13:09 GMT+01:00 Michael Van Canneyt <michael at freepascal.org>:
>>
>> No. The compiler already uses &.
>>
>> & means 'the following is an identifier even if it is a keyword'.
>>
>> You can perfectly declare and compile:
>>
>> Var
>>   &if : integer;
>>
>> begin
>>   &if:=1;
>> end.
>>
>> So &if is a bad idea.
>
>
> Yes it is possible. Anyway it is better idea than IfThen. You treat facts
> selectively. How often is used &if and how often is used IfThen?
>
> &IfThen looks also good (I like shorter syntax &if). With "&" prefix it is
> obvious that this function is unique.
>

you can even perfectly declare and compile:

var
  inc, dec, chr: integer;
  ifthen: integer;
  &whatever: integer;

It means that inc/&if intrinsic name is bad? Srsly?

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


More information about the fpc-pascal mailing list