[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is this Lua table an array?
- From: "Ashutosh Sharma" <ashutoshsharma@...>
- Date: Tue, 3 Oct 2006 16:57:42 +0530
On 10/3/06, Nick Gammon <nick@gammon.com.au> wrote:
You would have to define "an array" here.
You're right, Nick. I would consider any non-empty table with only
contiguous numeric keys starting at 1 to be array, i.e. the very basic
case. Everything else can be considered to be a table/object.
Actually, I'm interested in finding this in C code rather than in Lua
code. Perhaps some Lua internal data-structure might be of use here,
in case there's some optimization for such a case.
Thanks,
Ashutosh