[fpc-pascal] Some questions regarding language changes in trunk
Sven Barth
pascaldragon at googlemail.com
Sun Feb 9 11:21:59 CET 2014
On 09.02.2014 03:48, leledumbo wrote:
>>
> http://wiki.freepascal.org/User_Changes_Trunk#Comparative_operators_can_have_any_result_type
>
> Is this a preparation for LINQ-like functionality?
Delphi compatibility. But as the example shows you could use it for
LINQ-like functionality as well.
>
>> http://wiki.freepascal.org/User_Changes_Trunk#True_and_False_are_not_keywords_anymore
>
> With false and true being integer, how could it be used in an
> boolean-expression-expected context? e.g. if, while and until condition?
> Anyway, AFAIK classically Boolean is declared as enum:
>
> type Boolean = (False,True);
Delphi compatibility (or as is written for that entry: compatibility to
other Pascal compilers in general). This won't have any negative impact
on logical expressions. Also keep in mind that comparisons with "= True"
could lead to wrong results anyway as "True" for Boolean and friends is
"1" while "True" for ByteBool and friends is any non-zero value.
Regards,
Sven
More information about the fpc-pascal
mailing list