[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Behavior of logical operators
- From: "Andre Naef" <andre@...>
- Date: Sun, 13 Mar 2011 22:44:15 +0100
> yes, it's serious, but note that it only happens with hardcoded
> constants. if you do the same operations on variables (as would be on
> any real program) you get the correct results.
Thanks for the feedback and the patch.
For me, the problem actually _did_ occur in a real program.
In that program, I have now replaced
local outcome = (<complex_condition>) and true or false
by
local outcome
if <complex_condition> then
outcome = true
else
outcome = false
end
<commplex_condition> must be forced into boolean domain (true, false), as this is required for further processing by the program. Is there a more elegant way to do this?