lua-users home
lua-l archive

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

On Mon, Apr 08, 2013 at 10:25:07AM -0300, Romeu Braz Pereira Gomes Filho wrote:
> Is this an expected result or a bug?


The # operator is only guaranteed to return *a* boundary, not the first one.
(Where boundary is defined as t[#t] ~= nil && t[#t +1] == nil

In other words, it's only guaranteed to behave nicely in full arrays (ones with
no gaps).


Daniel Silverstone               
PGP mail accepted and encouraged.            Key Id: 3CCE BABE 206C 3B69