On Wed, Mar 13, 2024 at 3:44 PM Chet Ramey <chet.ra...@case.edu> wrote:
>
> `local' always creates variables at the current scope, or at the global
> scope if `-g' is supplied. If it's supplied the name of a nameref, it first
> resolves the nameref to find the name of the variable it's supposed to act
> on, failing if it can't. Once it has the name it needs, it creates or
> modifies the variable at the current scope. It doesn't try to create or
> modify the variable at the nameref's scope. This is one consequence of
> dynamic  scoping that affects the implementation: a nameref's value is just
> a name, not a pointer to a specific instance of a variable. Once you have
> that name, the normal scoping rules apply.
>
> If you want to look at it from a filesystem perspective, a nameref is a
> symlink, rather than a hard link.

Alright, that's all fair. But this?

On Sun, Mar 10, 2024 at 7:29 PM Zachary Santer <zsan...@gmail.com> wrote:
>
> Additionally, a nameref variable referencing a variable declared in a calling 
> function hides that variable in the scope of the function where the nameref 
> variable is declared.

Reply via email to