On Tue, 30 Jul 2019, Ondrej Pokorny wrote:
On 30.07.2019 08:23, Ondrej Pokorny wrote:
/Remark: The order in which expressions of the same precedence are
evaluated is not guaranteed to be left-to-right./
Is this valid for boolean expressions, too? I use the following construct
with {$BOOLEVAL OFF}:
Result := Assigned(MyObject) and (MyObject.Value>5);
A moment of relief. The FPC compiler itself depends on the left-to-right
evaluation. E.g. compiler/aoptbase.pas, line 284:
while assigned(p1) and assigned(p2) and GetNextInstruction(p1,p1) and
(p1<>p2) do
So is the documentation wrong or are the compiler (and also my own) sources
flawed?
The documentation has already been fixed in this regard, there was a
bugreport about it not so long ago.
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel