Closed Prometheus3375 closed 6 months ago
Surprising. I think i checked this once (long ago). So either i failed or they actually touched the parsing part in recent patches. Thanks for the report. Should be fixed with dec9c9c523f4793746557d92f6ab9429ffa2ff21
I've just checked in 1.26, map was working OK.
According to the description I found, precedence goes in the following way (from highest to lowest):
not
.and
. If its 1st operand evaluates to false
, 2nd operand is not evaluated at all.or
. If its 1st operand evaluates to true
, 2nd operand is not evaluated at all.I am not sure about comparison operations and modulo.
UPD: I checked a bit looks like this list is legit.
Well, actually...
if false and true or true then
call BJDebugMsg("true")
else
call BJDebugMsg("false")
endif
In this case the whole expression is evaluated to false
. 🤣
This is because of and
optimization, or
is never evaluated.
This code produces error:
Actually, at first
<
and>
are evaluated and then==
.Error:
This once correctly evaluates to
true
.There can be other issues related to precedence in comparisons.