bug-gawk
[Top][All Lists]
Advanced

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

Re: two separate issues related to readall() in Gawk ver. 5.2.0


From: arnold
Subject: Re: two separate issues related to readall() in Gawk ver. 5.2.0
Date: Sat, 17 Sep 2022 12:21:27 -0600
User-agent: Heirloom mailx 12.5 7/5/10

J Naman <jnaman2@gmail.com> wrote:

> This is a report about two separate issues related to readall() in ver.
> 5.2.0
> # Gawk ver 5.2.0 (mingw) api3.2 GNU MP 6.1.2 GNU MPFR 4.0.2
>
> 1) minor conflict in the documentation:
> (Section 7.5.2): "Prior to version 5.0 of gawk, you could use an index for
> SYMTAB
>  that was not a predefined identifier: SYMTAB["xxx"] = 5; print
> SYMTAB["xxx"];
>  This no longer works, instead producing a fatal error, as it led to rampant
> confusion."
> NOT TRUE NOW IF the following procedure is followed: (error checking not
> shown)

I'm not going to worry about this. The point is that SYMTAB["xxx"] = 5
in the program text won't work.

> 2) minor bug revealed:
> SYMTAB contained entries for: dBug::_ foo::arr foo::test_namespace pgm::run
> #stderr> warning: readall: unable to set foo::arr
> #stderr> warning: readall: unable to set pgm::run
> #stderr> warning: readall: unable to set dBug::_
> #stderr> warning: readall: unable to set foo::test_namespace
>
> Note: the namespace variables had a variety of data types:
> foo::test_namespace="test"
> split("",foo::arr); foo::arr[2]=foo::test_namespace;
> foo::arr["xyz"]=3;
> dBug::_["flag"]=1;

The code just needs to be smarter. It an identifier contains :: it
needs to call sym_update_ns() instead of sym_update().  I may try to
fix this.

Thanks,

Arnold



reply via email to

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