Re: [PATCH v2] CodingGuidelines: explicitly allow "local" for test scripts
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- May 5, 2021, 00:08 UTC
- Message-ID
- <6091e1f12ddf9_cc8208b9@natae.notmuch>
- In-Reply-To
- <YJHWJRYOcFEvHoD/@camp.crustytoothpaste.net>
brian m. carlson wrote:
Show 6 quoted lines
> On 2021-05-04 at 15:09:54, Ævar Arnfjörð Bjarmason wrote: > > My aim here was to discover if we had any reason to think that "local" > > was less universally implemented than other POSIX/C89-plus features we > > rely on. It seems that it's not. > > "local" is missing in AT&T ksh.
It's not missing, it's supported only in "functions", which have a different syntax in ksh:
function f { local x="foo"; echo $x; }; f-- Felipe Contreras