Re: undo local variable with unset

2015-01-06 Thread Chet Ramey
On 1/5/15 3:14 PM, Poor Yorick wrote: > In the following script, the effect of calling f0 is that the value global $i > is still 5, but the effect of calling f1 is that the value of the global $i is > 9. It's nice to be able to create a function like unlocal that moves local > variables out of the

Re: undo local variable with unset

2015-01-05 Thread Poor Yorick
On Mon, Jan 05, 2015 at 03:25:56PM -0500, Greg Wooledge wrote: > On Mon, Jan 05, 2015 at 01:14:53PM -0700, Poor Yorick wrote: > > It's nice to be able to create a function like unlocal that moves > > local > > variables out of the way, but I'm wondering if it can be relied on in > > future > > v

Re: undo local variable with unset

2015-01-05 Thread Greg Wooledge
On Mon, Jan 05, 2015 at 01:14:53PM -0700, Poor Yorick wrote: > It's nice to be able to create a function like unlocal that moves > local > variables out of the way, but I'm wondering if it can be relied on in > future > versions: Chet can give the authoritative answer about future directions, bu

undo local variable with unset

2015-01-05 Thread Poor Yorick
In the following script, the effect of calling f0 is that the value global $i is still 5, but the effect of calling f1 is that the value of the global $i is 9. It's nice to be able to create a function like unlocal that moves local variables out of the way, but I'm wondering if it can be relied