[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: memorize a table
- From: Wim Couwenberg <debosberg@...>
- Date: Sun, 27 Jun 2004 11:58:10 -0700 (PDT)
You can set an environmetn for function dummy:
function dummy()
...
end
setfenv(dummy, setmetatable({}, {__index =
getfenv(dummy)}))
This has to be done only once. The environment is
private to dummy (no change in the globals) and is
static in the sense that it is preserved between
calls.
--
Wim
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com