lua-users home
lua-l archive

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


Hi Everyone,
Lua Length Operator ('#' or lua_objlen) when applied to tables only
returns the size of table's array portion and says nothing about its
hash portion (records).

For example,

t={a=1,b=2}
=#t
0


How can one easily find out the number of records stored in a table?
I think that there should be a convenient idiom for such a common task.

Best Regards,
--Leo--