Yes. The "=" isn't really important; only the "for ... do" parts. Any variables defined between "for" and "do" are automatically local to the scope that starts with "for" and ends with the corresponding "end".
Variables used in other types of loops are not automatically local, eg:
Code:
local i = 1
while i < 10 do
-- i exists here
i = i + 1
end
-- and it still exists here
Code:
local i = 1
repeat
-- i exists here
i = i + 1
until i == 10
-- and still here
Also:
Code:
local i = 1
for i = 1, 3 do
print(i)
end
print(i)
... will print 1 2 3 1, since the "i" inside the loop is the one declared as part of the "for" statement, while the "i" that exists after the for-loop's "end" statement is the one explicitly defined as "local i" before the loop.