lua-users home
lua-l archive

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

Adam D. Moss wrote:
Oh, sorry, I misread your code a bit.  What I mentioned would
explain the 2,nil thing but perhaps not the (n>0 and (not tbl[n]))
thing (unless tbl[n] was boolean false).

Gah, third try.  Don't mind me, it was a heavy night last
night... I do see your main point, that the getn() of an
apparently-empty table is !0.  I wonder if this is related
to the very few cases where Lua makes a distiction between
table indices that are truly empty and table indices that
have had nil explicitly assigned to them.