bug-gawk
[Top][All Lists]
Advanced

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

Re: Bug? - GNU Awk 5.0.1, API: 2.0 (GNU MPFR 3.1.5, GNU MP 6.1.2)


From: arnold
Subject: Re: Bug? - GNU Awk 5.0.1, API: 2.0 (GNU MPFR 3.1.5, GNU MP 6.1.2)
Date: Fri, 10 Jan 2020 03:19:39 -0700
User-agent: Heirloom mailx 12.5 7/5/10

Hi.

Thanks for the report. 

I cannot reproduce this under Linux using either 5.0.1 or current master:

$ cat foo.awk
function show_symbol_table(  count,i) {
    for (i in SYMTAB) {
      printf("%s ",i)
      if (isarray(SYMTAB[i])) { count++ }
    }
    printf("\nsymbol table contains %d names of which %d are 
arrays\n\n",length(SYMTAB),count)
}

BEGIN {
        answer = 42
        show_symbol_table()
}
$ ./gawk -f foo.awk 
ARGV ROUNDMODE ORS OFS LINT FNR ERRNO NR IGNORECASE TEXTDOMAIN NF ARGIND ARGC 
PROCINFO FIELDWIDTHS CONVFMT SUBSEP PREC answer ENVIRON RS FPAT RT RLENGTH OFMT 
FS RSTART FILENAME BINMODE 
symbol table contains 29 names of which 3 are arrays

Where did you get your Windows executable from?

Thanks,

Arnold


J Naman <address@hidden> wrote:

> I read about Namespace and decided to print SYMTAB. It blew up with
> "Assertion failed: n->type == Node_val, file awk.h, line 1942 This
> application has requested the Runtime to terminate it in an unusual
> way. Please contact the application's support team for more information." I
> am running *Windows 7 x64*, GNU Awk 5.0.1, API: 2.0 (GNU MPFR 3.1.5, GNU MP
> 6.1.2). Problem code is:
> function show_symbol_table(  count,i) {
>     for (i in SYMTAB) {
>       printf("%s ",i)
>       if (isarray(SYMTAB[i])) { count++ }
>     }
>     printf("\nsymbol table contains %d names of which %d are
> arrays\n\n",length(SYMTAB),count)
> }
> I did NOT use @namespace "anything" (yet), just vanilla gawk. Tried it with
> i & count global, same blow up. This is not a huge bug, just FYI. And a
> million thanks for all the time & effort everyone puts into keeping GAWK
> alive and evolving. Thanks, John Naman (address@hidden, if you want to get
> my attention, screen shots, etc.)
> JohnN



reply via email to

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