Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: static vs. dynamic scoping



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