[fpc-pascal] precedence "is" and "and"

Martin Wynne martin at templot.com
Sat Dec 8 23:10:24 CET 2018

> var
>    b: boolean;
>    o: TObject;
> begin
>    // this compiles, but should fail:
>    if o is TComponent and b then ;

It will compile if $BOOLEVAL is on the default (-) because the result 
can be determined without considering precedence, see:


Try it the other way round and it will fail:

o: TComponent;
if o is TObject


More information about the fpc-pascal mailing list