[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Size of a non numerical indexed table
- From: Wim Couwenberg <w.couwenberg@...>
- Date: Wed, 31 Aug 2005 23:09:24 +0200
> If it's a numerical indexed table, I can use
> table.getn, but if the table is indexed by names, how
> to get it's size?
There is no simple call like table.getn. If you just want to know if
a table is empty (the most likely application) you can use next:
if next(t) == nil then
-- t is empty
end
--
Wim