Re: catching writes to loop index
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: catching writes to loop index
- From: Rici Lake <lua@...>
- Date: Mon, 7 Feb 2005 11:18:03 -0500
On 7-Feb-05, at 11:09 AM, Mike Pall wrote:
Hi,
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")