lua-users home
lua-l archive

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


> >     for b=1,10 do ... end		-- new b or same as above?
> >     for c=1,10 do			-- again, new c?
>
> for has special rules; I don't propose to change these.
>
> >       ...=function() print(c) end	-- will all funcs get the same c?

Whatever happens at the moment.

> >       c=c				-- what gives this?

You're not allowed to assign to the index of a for loop.

> >       ...=function() print(c) end	-- and now?
> >       d=c

This is like "local d = c".

> >       ...=function() print(d) end	-- and now?
> >     end
> >   end
> >
> > You will get really strange results with block scope and other
> > strange results with a single function scope.

I haven't added any idea of single function scope. (This second email is
to try to clear this up, plus the treatment of for loops.)

-- 
http://sc3d.org/rrt/
Kleineken: refreshes the dimensions other beers cannot reach