lua-users home
lua-l archive

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

On Tue, 27 Oct 2020, 19:27 Grzegorz Krasoń, <> wrote:
How to understand the difference between t1 and t2 in the example below? They give the same results while iterating, but `#` returns different values. Is this expected?

Yes, it is expected. See the definition of the length operator in the manual:

Specifically, your example tables are not sequences and the length operator may return one of multiple possible values for such a table.