Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: static vs. dynamic scoping
- X-seq: zsh-workers 28403
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Eric Blake <eblake@xxxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: static vs. dynamic scoping
- Date: Wed, 10 Nov 2010 09:22:50 -0800
- In-reply-to: <4CD9C64E.8060307@xxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <4CD9C64E.8060307@xxxxxxxxxx>
One additional thought on this ...
Zsh does have the "-g" option of "typeset" to allow one declare or
to change the properties of a variable that is not in the scope of
the current function. However, "-g" doesn't really mean "global";
it means only "the nearest dynamic scope where this variable is
already declared" which is the global scope if the parameter has
never been declared, but might even be the current scope if there
has previously been a "local" delcaration of the variable.
Does ksh93 have any mechanism for explicitly declaring a variable to
be global from inside a function scope?
--
Messages sorted by:
Reverse Date,
Date,
Thread,
Author