lua-users home
lua-l archive

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


   Oops, I left something out:

 >> How is it different from this (which does work):

fl = nil
function g(a)
  local gl = fl -- no problem referencing a global, even if nil
  print(gl) -- gl is of course itself still nil
end
g(123)


   (which was just meant to be a sort of global version of the previous
example)

   Cheers,

   Dave