bug-gawk
[Top][All Lists]
Advanced

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

Re: fatal: internal error Ver 5.2.0 readall()


From: arnold
Subject: Re: fatal: internal error Ver 5.2.0 readall()
Date: Sun, 11 Sep 2022 13:12:02 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Hi.

In the future, please send source files as attachments, and not with
output mixed in to the middle; it makes it easier for me to deal with
things.

It turns out that this does reproduce on Linux.

Changing the reader program to be:

@load "rwarray"
BEGIN {
        ret = readall("foo.binawk");
        print ret " = readall(\"foo.binawk\");"
        printf("arr1: len=%s\n",length(arr1))
}

causes things to work without trouble. In short, you should not
force arr1 to be an array using split, but let readall handle setting
up the types and the contents.

Thanks,

Arnold

J Naman <jnaman2@gmail.com> wrote:

> # Sorry, I do not have a "gawkbug script"
> in a nutshell: readall() gives me 'fatal: internal error: file interpret.h,
> line 253: unexpected parameter type Node_val' as described below:
>
> # TEST writeall()
> # Gawk ver 5.2.0 (mingw) api3.2 GNU MP 6.1.2 GNU MPFR 4.0.2
> @load "rwarray"
> BEGIN{
> split("",arr1); for(i in SYMTAB) { if(!isarray(SYMTAB[i])){
> arr1[i]=SYMTAB[i];}}
> ret = writeall("foo.binawk");
> print ret " = writeall(\"foo.binawk\");"
> exit;
> }
> # stdout: 1 = writeall("foo.binawk");
> # TEST readall()
> # Gawk ver 5.2.0 (mingw) api3.2 GNU MP 6.1.2 GNU MPFR 4.0.2
> @load "rwarray"
> BEGIN{
> split("",arr1);
> printf("arr1: len=%s\n",length(arr1))
> ret = readall("foo.binawk");
> print ret " = readall(\"foo.binawk\");"
> #**> fatal: internal error: file interpret.h, line 253: unexpected
> parameter type Node_val
> printf("arr1: len=%s\n",length(arr1))
> exit;
> }
> #===============
> # stdout: arr1: len=0
> # stdout: 1 = readall("foo.binawk");
> # foo_readAll.awk:12: fatal: internal error: file interpret.h, line 253:
> unexpected parameter type Node_val
>  Note: granted one can use reada() and writea(), but when I got the error
> with readall(), I cut out all variables until only the one array was left
> that caused the error. Thanks, John



reply via email to

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