bug-gawk
[Top][All Lists]
Advanced

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

Re: Inconsistency in Namespace Internal Name Management, Ver 5.1.1


From: arnold
Subject: Re: Inconsistency in Namespace Internal Name Management, Ver 5.1.1
Date: Fri, 31 Dec 2021 01:51:06 -0700
User-agent: Heirloom mailx 12.5 7/5/10

This looks like a bug.

Can you write up a full test case, including your discussion with
Andy?  Then I will look into fixing it.

Thanks,

Arnold

J Naman <jnaman2@gmail.com> wrote:

> Ref: 15.6 Internal Name Management (in Namespaces)
> "For backwards compatibility, all identifiers in the awk namespace are
> stored internally as
> unadorned identifiers (that is, without a leading ‘awk::’). This is mainly
> relevant when
> using such identifiers as indices for SYMTAB, FUNCTAB, and
> PROCINFO["identifiers"]"
>
> The above is True for user-defined functions (UDFs)
> defined with a namespace qualified name, i.e. ns::foo()
> @namespace "ns"
> ns::foo is YES in FUNCTAB
> ns::foo is YES in PROCINFO["identifiers"];
>
> *NOT True* for UDFs defined with awk namespace qualified name, i.e.
> awk::foo()
>
> "awk::foo" is NOT in FUNCTAB
> "awk::foo" is YES in PROCINFO["identifiers"];
>
>      "foo" is YES in FUNCTAB
>      "foo" is NOT in PROCINFO["identifiers"];
>
> Note: the above awk::foo() and foo()
> *will execute correctly, whether calleddirectly or indirectly,* without
> regard to their showing as 'in FUNCTAB' or
> PROCINFO["identifiers"];
> 'Best, John Naman, gawker@703n.com



reply via email to

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