lua-users home
lua-l archive

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

On Wednesday, March 04, 2015 07:02:14 PM Soni L. wrote:
> But that's for next, not ipairs()?

The description of ipairs offers no opinion on modifying the table. A naive 
reader of the manual might guess there is a relationship between ipairs and 
pairs. A more savvy reader might recall that next iterates over the array part 
of the table by incrementing the index not unlike how ipairs works (except it 
continues over holes). So ipairs could not be more permissive than pairs in 
allowing changes to the table.

tom <>