[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bug in 5.3 ipairs(), or feature?
- From: Tom N Harris <telliamed@...>
- Date: Wed, 04 Mar 2015 19:34:48 -0500
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.