zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Eric Blake <eblake@redhat.com>, zsh-workers@zsh.org
Subject: Re: static vs. dynamic scoping
Date: Wed, 10 Nov 2010 09:22:50 -0800	[thread overview]
Message-ID: <101110092252.ZM6257@torch.brasslantern.com> (raw)
In-Reply-To: <4CD9C64E.8060307@redhat.com>

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?

-- 


  parent reply	other threads:[~2010-11-10 17:23 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 [this message]
2010-11-10 17:30   ` Eric Blake
2010-11-10 18:01     ` Bart Schaefer

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=101110092252.ZM6257@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).