lua-users home
lua-l archive

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


>I thought of using a tagmethod for setglobal, but
>that did not seem to be allowed. Also, the globals 
>table is of not much help now (I guess).

The "setglobal" tagmethod for nil should work fine for Lua 4.0.
For Lua 5.0, use the "__newindex" metamethod.

>Another question: why is there no setenv() in the 
>std. lib???

Because it's not ANSI C. The man page in my Linyx box says that setenv is
only in BSD 4.3, not even in POSIX, which seems to have putenv.
--lhf