[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Adding some restrictions to users
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 20 May 2003 20:14:29 -0300
>You could use metamethods to implement a read-only table, by implementing
>the 'index' metamethod.
>As far as i know it is not possible to restrict variable assignment, but I'm
>not sure if there are some special cases or some new aspects in Lua 5.
Global variables are stored in an ordinary Lua table.
See test/readonly.lua in the distribution.