|
|
||
|
On 04/10/2006, at 6:01 PM, David Olofson wrote:
procedure do_stuff(y) { for local x = 1, 10 for local y = 1, 10 <stuff>; }
This will not compile, as the declaration 'local y' in the inner loop tries to redeclare the 'y' argument of the procedure. Same thing if x was declared outside the procedure; it wouldn't compile because 'local x' would be an attempted redeclaration.
However Lua currently allows redefinition, eg.
local y = 1; f () -- uses 1st y local y = 2; f () -- uses 2nd y
- Nick