lua-users home
lua-l archive

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


In message <F2E337EDDE894E7DAE85F2C348CE80B8@Mania> you wrote:

> The original meaning is correct, as for the table you describe #t may indeed
> be 2. Or it may be 0. It may differ between implementations, and is even
> allowed to differ between executions of the same line of code.
>
> This is the well known "tables with holes" problem, where to keep Lua
> efficient a solution has been chosen which makes the # operator fairly
> unusable on tables with nils in them.

Thanks for your clarification. I had not realized that # was not well
defined, but I can appreciate that it might be inefficient to make it
so.

-- 
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/