[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 11:19:25 -0600
> On Nov 20, 2013, at 11:01 AM, Sean Conner <sean@conman.org> wrote:
>
> Okay, so what happens here?
>
> function set_timeout(timeout)
> local timeout = timeout or math.huge
>
> -- rest of function
> end
>
> set_tiemout(0)
>
> Have I set the timeout to 0, or math.huge?
>
> -spc
timeout would be math.huge, which with numeric 0 being false for and/or statements is to be expected. ;)
I understand that in Lua timeout would be '0', but Lunia is no longer Lua, it is a second cousin at this point!
~pmd~
- References:
- 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
- Re: Zero as False, Paige DePol
- Re: Zero as False, Sean Conner