lua-users home
lua-l archive

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



On Dec 10, 2014, at 9:32 AM, Sean Conner <sean@conman.org> wrote:

If that were true, then ipairs() would be removed as you can always do:

for i = 1 , #t do ... end

As has been noted before, this does not have the same behavior as ipairs() if the table is not a valid sequence. (Earlier betas of 5.3 did have this behavior, but it has been reverted to stop the iteration at the first nil value, which is not necessarily at #t+1 for non-sequences.)

—Tim