[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: tables as array and "#" operator for size/length
- From: Tim Hill <drtimhill@...>
- Date: Sat, 14 Sep 2013 23:01:10 -0700
On Sep 14, 2013, at 7:54 PM, Josh Simmons <email@example.com> wrote:
> On 15 September 2013 12:15, IntelliAdmin Support
> <firstname.lastname@example.org> wrote:
>> It only counts to the first nil, and stops.
> This isn't entirely correct, in a table with holes the # operator can
> return _any_ n where t[n] ~= nil and t[n+1] == nil. It is not
> guaranteed to be the first hole.
> You can maintain a count yourself, or avoid putting holes in your tables.
No way am I going to contribute to this thread :)