From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: local after setopt allexport?
Date: Mon, 12 Aug 1996 10:03:11 +0200 [thread overview]
Message-ID: <199608120803.KAA29459@hydra.ifh.de> (raw)
In-Reply-To: "schaefer@candle.brasslantern.com"'s message of "Fri, 09 Aug 1996 09:42:24 MET." <960809094225.ZM23675@candle.brasslantern.com>
schaefer@candle.brasslantern.com wrote:
> Great Manitoba! Finally something that makes sense! That would
> explain why "typeset" acts like "local" when used inside a function:
> because it *always* acts like "local".
That's mostly true of zsh too, with the exception that anything
exported becomes global, otherwise it was impossible to export anything
from a function. Actually, the only difference there is that in zsh
you can't have `local -x', which you can in ksh; typeset -x in both
exports the variable globally. In this case local and typeset behave
differently in ksh.
> What does ksh do with
>
> FOO=bar
> export FOO
> typeset FOO=foo
>
> ?? Does that make FOO local?
If called in a function it creates a new copy of FOO with the value
foo, leaving the exported value as bar. Otherwise, it changes the
exported value.
None of this particularly increases my enthusiasm for either local
variable mechanism.
--
Peter Stephenson <pws@ifh.de> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.
next parent reply other threads:[~1996-08-12 8:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <960809094225.ZM23675@candle.brasslantern.com>
1996-08-12 8:03 ` Peter Stephenson [this message]
[not found] <960808224452.ZM21431@candle.brasslantern.com>
1996-08-09 8:49 ` Peter Stephenson
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=199608120803.KAA29459@hydra.ifh.de \
--to=pws@ifh.de \
--cc=zsh-workers@math.gatech.edu \
/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).