[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table/array length behavior
- From: M Joonas Pihlaja <jpihlaja@...>
- Date: Wed, 3 Mar 2010 17:20:44 +0200 (EET)
On Wed, 3 Mar 2010, Jon Nalley wrote:
> I am having a hard time understanding why I am seeing different
> behavior in the following cases:
[snip]
> Can anyone shed some light on this for me?
The short answer is: because Lua is on crack.
The slightly longer answer is: #t is defined to return an index i of
such that t[i] is non-nil and t[i+1] is nil, or zero if no such index
exists.
See http://www.lua.org/manual/5.1/manual.html#2.5.5
Cheers,
Joonas