[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Expression statements
- From: Jonathan Castello <twisolar@...>
- Date: Mon, 16 Aug 2010 12:54:02 -0700
On Mon, Aug 16, 2010 at 12:40 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> The typical Lua convention is to return nil, <error> on error, and
>> whatever the result is on non-error. It's not a hard-and-fast rule,
>> but some functions depend on it (like assert()).
>
> assert depends on true/false, not nil.
>
I just tested, I guess it asserts on both false and nil (i.e. any
false-y value).
Today just isn't my day...
~Jonathan