[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: My wish list
- From: Petite Abeille <petite.abeille@...>
- Date: Sat, 17 Mar 2012 01:32:09 +0100
On Mar 17, 2012, at 12:51 AM, Egor Skriptunoff wrote:
> Question: does generic loop variables indeed
> sensitive to assigning values to them?
$ lua -v
Lua 5.2.0 Copyright (C) 1994-2011 Lua.org, PUC-Rio
for aKey, aValue in ipairs( { 'a', 'b', 'c' } ) do
print( aKey, aValue )
aKey = 0
end
> 1 a
> 2 b
> 3 c
for anIndex = 1, 3 do
print( anIndex )
anIndex = 0
end
> 1
> 2
> 3
Apparently not sensitive.
http://www.lua.org/manual/5.2/manual.html#3.3.5