lua-users home
lua-l archive

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


> table.insert uses the same #len operator (aux_getn to be exact) and
> will gladly insert your new value into the first available hole.

a) if by the "first available" you do not mean the lowest index
(otherwise again someone following into this trap? :-), but the first
showing up on binary search, then its true.

b) it might or might not shift indexes after the hole:

See: similar holds true for insert:
http://lua-users.org/lists/lua-l/2010-12/msg00595.html

And see response:
http://lua-users.org/lists/lua-l/2010-12/msg00596.html