[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: require ignores setglobals()
- From: "Wim Couwenberg" <w.couwenberg@...>
- Date: Fri, 7 Feb 2003 12:03:00 +0100
Hi,
Peter Hill:
> So global table allow a sort of 'local' globals for a function? Ie, global
> variable references in a setglobal-ed function have the same scope as
> locals? Sort of do-it-yourself local variables?
"shared do-it-yourself static variables" [..?..] comes closer. If I
remember correctly, the globals system was designed (a/o) to support
packages consisting of several modules (i.e. script files.) By sharing a
package-private globals table, these modules can share private data.
Bye,
Wim