lua-users home
lua-l archive

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



On 12 Mar 2008, at 15:23, Eva Schmidt wrote:

So far, the only way to get a reliable information about the length of a table is to iterate it by using for i,v in pairs (tbl) and count the field by myself.

Correct.  But often it is sufficient to know if a table is empty or not:

next(tbl) == nil

will tell you that.

drj