[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: code generation bug
- From: Peter Cawley <lua@...>
- Date: Fri, 17 Apr 2009 17:16:05 +0100
On Fri, Apr 17, 2009 at 5:07 PM, Marco Antonio Abreu
<mabreu.ti@gmail.com> wrote:
> Hi Linker.
> You have to attend that the AND operator has a higher priority than the OR
> one. So, "1 or false and true or false" is correct when resulting 1.
"1 or false and true or false" should be interpreted as "(1 or false)
and (true or false)", which should evaluate to "(1) and (true)", which
should evaluate to "true", not "1" ("The conjunction operator *and*
returns its first argument if this value is *false* or *nil*;
otherwise, *and* returns its second argument" - Lua manual).