lua-users home
lua-l archive

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


Hi,

Think of it this way. Tables as arrays must be contiguous.
They start at index 1.  If you have anything else, you don't
have a table as an array. You have a table, and that's it.

You are welcome to try overloading ipairs, #, __newindex and
__index to fake 0-based arrays. Maybe this solves your
problem. You can't overload the constructors, so you will
have to stick to the internal representation.

Regards,
Diego