lua-users home
lua-l archive

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


>             5.2 REFERENCE MANUAL
>
>             "Unless a __len metamethod is given, the length of a
>             table t is only defined
>             if the table is a sequence, that is, the set of its
>             positive numeric keys is
>             equal to {1..n} for some integer n. In that case, n is
>             its length."

I would say: "The length is the value of the __len metamethod if present.
Otherwise the length is zero unless one or more positive numeric keys is
present, in which case the length is only defined if the set of such keys is
equal to {1..n} for some integer n, which is the length."

Attachment: smime.p7s
Description: S/MIME cryptographic signature