lua-users home
lua-l archive

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


> 	this is simple is there is no local value then try a global value if
> there is no global then create a local value.

But what if you wanted to read an unitialised local?

e.g.

while ... do

  if foo then ...

  foo = bar ()
end

here, I clearly want foo to be local, without declaring it. But you're
forcing it to be global. That doesn't sound like local by default!

-- 
http://www.mupsych.org/rrt/ | maxim, n.  wisdom for fools