Re: Table length operator
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Table length operator
- From: David Jones <drj@...>
- Date: 2008年3月12日 15:47:50 +0000
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