lua-users home
lua-l archive

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


> After the comments above of Francisco, I interprete it as safe to
> interprete the warning in the reference manual more like "It is safe
> to vary the counter loop variable inside the for loop limits, but any
> new value outside the for loop might lead to undefined behaviour." ...
> I hope I will survive this and not run into explosions :).

- It is possible that the next Lua version will operate directly with
the loop variable, without any internal copy.

- It is possible that, in the next Lua version, the loop control
variable will be implicit declared as <const> to make the above change
safer.

-- Roberto