zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Eric Blake <eblake@redhat.com>
Cc: zsh-workers@zsh.org
Subject: Re: static vs. dynamic scoping
Date: Wed, 10 Nov 2010 10:01:57 -0800	[thread overview]
Message-ID: <101110100157.ZM6378@torch.brasslantern.com> (raw)
In-Reply-To: <4CDAD6BA.1020902@redhat.com>

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
}


      reply	other threads:[~2010-11-10 18:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09 22:08 Eric Blake
2010-11-10 11:10 ` Peter Stephenson
2010-11-10 16:50 ` Bart Schaefer
2010-11-10 17:28   ` Eric Blake
2010-11-10 17:43     ` Eric Blake
2011-05-29  6:38     ` Thorsten Glaser
2010-11-10 17:22 ` Bart Schaefer
2010-11-10 17:30   ` Eric Blake
2010-11-10 18:01     ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=101110100157.ZM6378@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=eblake@redhat.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).