[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unset array doesn't work
From: |
Chet Ramey |
Subject: |
Re: Unset array doesn't work |
Date: |
Wed, 28 Feb 2018 15:14:58 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 2/28/18 3:00 PM, Greg Wooledge wrote:
> Does unset create some kind of "placeholder" in the current function
> (but not in a caller)?
Yes, that's what I said. In the current scope, unset arranges for the
variable to appear unset. In a previous scope, unset just removes the
variable, which uncovers an instance of the variable at a (further)
previous scope.
It looks like I added that code in 1995. The code before that was "pure"
dynamic scoping, in the sense that it just removed the variable and
`uncovered' a previous scope's value no matter where the variable was
declared. It seems like I added the special case for several reasons,
but there's no indication of widespread user complaint about the behavior
of `unset'. (Of course, that was a long time ago.)
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/
- Re: Unset array doesn't work, (continued)
- Re: Unset array doesn't work, Robert Elz, 2018/02/26
- Re: Unset array doesn't work, Chet Ramey, 2018/02/27
- Re: Unset array doesn't work, Robert Elz, 2018/02/26
- Re: Unset array doesn't work, Chet Ramey, 2018/02/27
- Re: Unset array doesn't work, Chet Ramey, 2018/02/27
- Re: Unset array doesn't work, Chet Ramey, 2018/02/27
- Re: Unset array doesn't work, Robert Elz, 2018/02/27
- Re: Unset array doesn't work, Chet Ramey, 2018/02/28
- Re: Unset array doesn't work, Robert Elz, 2018/02/28
- Re: Unset array doesn't work, Greg Wooledge, 2018/02/28
- Re: Unset array doesn't work,
Chet Ramey <=
- Re: Unset array doesn't work, don fong, 2018/02/28
- Re: Unset array doesn't work, Robert Elz, 2018/02/28