lua-users home
lua-l archive

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


> One of the incorrect assumptions I had was that ipairs(t) would
> produce the same keys as 1..#t, but it's clearly not the case as 1..#t
> may iterate over holes, but ipairs never does this (at least in Lua 5.1).

The bottom line is: don't use #t or ipairs if you have holes in your table.