Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #13763 > unrolled thread
| Started by | Robert Elz <kre@munnari.OZ.AU> |
|---|---|
| First post | 2018-02-28 03:49 +0700 |
| Last post | 2018-02-28 03:49 +0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Unset array doesn't work Robert Elz <kre@munnari.OZ.AU> - 2018-02-28 03:49 +0700
| From | Robert Elz <kre@munnari.OZ.AU> |
|---|---|
| Date | 2018-02-28 03:49 +0700 |
| Subject | Re: Unset array doesn't work |
| Message-ID | <mailman.9844.1519786861.27995.bug-bash@gnu.org> |
Date: Tue, 27 Feb 2018 11:18:40 -0500
From: Chet Ramey <chet.ramey@case.edu>
Message-ID: <21679c48-4064-5683-2d5f-91bfb76687d0@case.edu>
| It doesn't. Run the following script:
OK, that looks good. But now I am very confused.
| You'll see that the first expansion of `$var' uses the local value of IFS,
| the second expansion uses the default value of $' \t\n', and the global
| value doesn't change (or get unset) outside the function.
Yes, and I was never expecting the global to be changed (that is, in this,
I didn't imagine that as a possibility).
| The objection was that the global or previous-scope value didn't get unset
| when using the `unset' builtin; only in the local scope was it unset.
I was in e-mail catchup mode, I am not sure I even saw the original, but I
do tend to read your messages, and what you said (12 Feb) was ...
| The visibility of a local variable is restricted to a function and its
| children,
That's fine.
| and `unset' removes the currently-visible instance.
as is that, at least if "removes" is interpreted in one way (which the
script you sent suggests is correct).
But:
| Removing such an instance can `unconver' an instance in a previous scope.
What's that?
That;s not what the script shows happening, the global IFS was not
"uncovered" (whatever that means).
It was that sentence that caused my reply.
Since it does not seem to mean what I thought it meant, perhaps you could
say what it did mean?
kre
Back to top | Article view | gnu.bash.bug
csiph-web