lua-users home
lua-l archive

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

On 7-Feb-05, at 11:09 AM, Mike Pall wrote:


Asko Kauppi wrote:
Lua 5.0 refman says:

"The behavior [of the iterative for statement] is undefined if you
assign to var_1 inside the block."

This has already changed in Lua 5.1. You get a private copy of the control
variable inside the loop. Modifying it is safe now.

The question is, will it be documented as safe? (My vote is "yes")