help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature request, vars local only to function running, not sub functi


From: Koichi Murase
Subject: Re: feature request, vars local only to function running, not sub functions running
Date: Thu, 13 May 2021 12:18:23 +0900

> foo=global
> func1() { local foo=dynamic; func1; }
> func2() { local -L foo=lexical; func2; }
> func3() { echo $foo; }

Sorry, there are typos, and the function call of func1 was missing:

foo=global
func1() { local foo=dynamic; func2; }
func2() { local -L foo=lexical; func3; }
func3() { echo $foo; }
func1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]