lua-users home
lua-l archive

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

In chapter 3.3.5, there is a bit a "strange sounding" warning:
"You should not change the value of the control variable during the loop."

... is this not a bit "over-cautious"?

e. g. in a typical loop "for i=1,count do ... end", it is quite often
really useful to repeat a loop sequence by "i=i-1", or to repeat
complete loop by "i=1" assignment.

This REALLY can be dangerous? (or can give anybody possibly give some
illegal / "bad-running" example for such change?)