[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: disabling global definitions within function blocks
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 7 Jan 2003 16:46:52 -0200
>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.