lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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