lua-users home
lua-l archive

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


> >From a programmer point of view, #t defined as max(k) for k>=1 and
> t[k]~=nil (or 0 if no such k exists) makes the most sense to me. [...]
> 
> The main reason for me to use ipairs was that it behaved as max(k)
> above. [...]

I think it does not. Maybe you meant
  max(k) such that for all i in [1..k], t[i] ~= nil?

-- Roberto