[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Undefined variables returning nil
- From: Andrew Starks <andrew.starks@...>
- Date: Wed, 20 Mar 2013 12:23:57 -0500
On Wed, Mar 20, 2013 at 12:15 PM, Shmuel Zeigerman <shmuz@013net.net> wrote:
> On 20/03/2013 19:07, Andrew Starks wrote:
>>
>> ...because t.attribute could be set to boolean false. So if I want to
>> know if it's there and false:
>>
>> if t.attribute ~= nil and not t.attribute then .... end
>
>
> Why not just:
>
> if t.attribute == false then .... end ?
>
> --
> Shmuel
>
because i'm dumb.
:)
-Andrew