Re: parameter scope in bourne vs ksh functions

2011-06-27 Thread Ted Unangst
On Mon, Jun 27, 2011 at 2:44 PM, Christopher Zimmermann wrote: > Ok, I got it. But wtf? Thats creepy! Is there any rationale behind this > strange bourne behaviour?!? I would guess historical accident or some quirk of the implementation. Then once it was discovered, it became unfixable because o

Re: parameter scope in bourne vs ksh functions

2011-06-27 Thread Christopher Zimmermann
On 06/27/11 17:49, Ted Unangst wrote: > On Mon, Jun 27, 2011 at 11:00 AM, Christopher Zimmermann > wrote: >> Hi, >> >> ksh(1) states this: >> >> Functions defined with the function reserved word are treated differently >>in the following ways from functions defined with the () notation: >> >>

Re: parameter scope in bourne vs ksh functions

2011-06-27 Thread Ted Unangst
On Mon, Jun 27, 2011 at 11:00 AM, Christopher Zimmermann wrote: > Hi, > > ksh(1) states this: > > Functions defined with the function reserved word are treated differently >in the following ways from functions defined with the () notation: > >[...] > >o Parameter assignments precedin

parameter scope in bourne vs ksh functions

2011-06-27 Thread Christopher Zimmermann
Hi, ksh(1) states this: Functions defined with the function reserved word are treated differently in the following ways from functions defined with the () notation: [...] o Parameter assignments preceding function calls are not kept in the shell environment (executing Bour