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

Re: static vs. dynamic scoping



On Nov 10, 10:30am, Eric Blake wrote:
>
> I'm not that familiar with ksh93; you'd have to ask David Korn for
> precise details.  But my understanding is that with static scoping,
> every variable reference which was not explicitly declared local is
> inherently global, because there are no other scopes to worry about.

Right, and that works fine for simple assignments and for expansion.
I'm curious about what happens when you want to declare something
not-static but also not a simple scalar, e.g.

f() {
    # Is there any way to make these global?
    typeset -i4 an_int
    typeset -u all_upper
}



Messages sorted by: Reverse Date, Date, Thread, Author