bug-gawk
[Top][All Lists]
Advanced

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

Re: delete of nested array is in consistent


From: arnold
Subject: Re: delete of nested array is in consistent
Date: Fri, 17 Apr 2020 01:26:17 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Peng Yu <address@hidden> wrote:

> See below. I'd expect the second one should also print array. Is it a bug?
>
> $ awk -e 'BEGIN { delete a[""]; print typeof(a) }'
> array
> $ awk -e 'BEGIN { delete a[1][""]; print typeof(a[1]) }'
> unassigned
>
> -- 
> Regards,
> Peng

Upgrade your version of gawk:

$ ./gawk --version | sed 2q
GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.0.1, GNU MP 6.1.2)
Copyright (C) 1989, 1991-2020 Free Software Foundation.
$ ./gawk 'BEGIN { delete a[""]; print typeof(a) }'
array
$ ./gawk 'BEGIN { delete a[1][""]; print typeof(a) }'
array



reply via email to

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