lua-users home
lua-l archive

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

> On 7 June 2010 02:53, Javier Guerra Giraldez <> wrote:
> > On Sun, Jun 6, 2010 at 8:13 PM, T T <> wrote:
> >> Which makes me wonder why #t is not specified in such a way to be
> >> usefull for tables with holes too.
> [...]
> The one given in the starting message of this thread seems to be the
> most suitable from the "usefulness" POV:
> "The length of a table t is defined to be the least non-negative
> integer n such that t[n+1] is nil and t[m] is non-nil for any
> positive integer m less than n+1."?
> In other words #t would return size of the array part that is without holes.

What is this useful for?

-- Roberto