Re: Passing variables by reference conflicts with local
From:
Chet Ramey
Subject:
Re: Passing variables by reference conflicts with local
Date:
Tue, 04 May 2010 21:33:04 -0400
User-agent:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1
On 5/3/10 5:38 PM, Freddy Vulto wrote:
> I think I found a much cleaner workaround. It looks like a called
> function can really unset local variables in the caller(?!),
This isn't surprising. A function could always unset variables at a
higher scope; e.g., a function can unset a variable with global scope.
A local variable has a scope limited to the function where it was
declared and that function's callees. In effect, the local variable's
"root" is the function where it was declared. A called function can
unset a variable up to the "root".
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/