lua-users home
lua-l archive

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


>Here's some quickie draconian code that might fit your needs.
>Basically it makes an error if you try to assign to a global whose
>current value is nil (i.e. undefined).  It doesn't catch typos until
>run-time, but then it works with stock Lua 4.0.

For a Lua 5.0 solution see test/readonly.lua in the alpha or beta distributions.
--lhf