[Date Prev][Date Next][Thread Prev][Thread Next]
- 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
if <complex_condition> then
outcome = true
outcome = false
<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?