lua-users home
lua-l archive

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


Bret Mogilefsky wrote:
> Better instead to put in setglobal/getglobal functions that check whether the 
> variable has been earlier "declared" by calling a special function. 

How did you deal with locals?

Example:

function test()
  local aString = ""
  print(astring)
end

Seems like you'd need a way of looking at the stack in this case. upvalues?

Steve