[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Zero as False
- From: Paige DePol <lual@...>
- Date: Wed, 20 Nov 2013 08:13:28 -0600
> On Nov 19, 2013, at 7:27 PM, Tim Hill <drtimhill@gmail.com> wrote:
>
> As has been noted, I don’t think “0 == false” should be true anyway .. in current Lua “nil == false” is also false. It’s important not to confuse “false-ness” with the value “false”.
Upon further reflection, and a good night sleep, I now see what you mean, Tim. :)
I have made it so that boolean true/false should be false when compared to numbers. Numeric 0 will still result in a false value when used in expressions, but when compared to an actual boolean value, it will return false.
Essentially, I left in my change to the l_isfalse macro and removed my luaV_equalbool_ function from the luaV_equalobj_ macro.
Thank you for giving me something to think about! :)
~pmd~
- References:
- Zero as False, Paige DePol
- Re: Zero as False, Paige DePol
- Re: Zero as False, Paige DePol
- Re: Zero as False, Daurnimator
- Re: Zero as False, Rena
- Re: Zero as False, Paige DePol
- Re: Zero as False, Coda Highland
- Re: Zero as False, Paige DePol
- Re: Zero as False, Coda Highland
- Re: Zero as False, Paige DePol
- Re: Zero as False, Tim Hill