[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Can a key in a array be deleted while the array is iterat
From: |
arnold |
Subject: |
Re: [bug-gawk] Can a key in a array be deleted while the array is iterated? |
Date: |
Tue, 03 Jan 2017 07:39:27 -0700 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
"Andrew J. Schorr" <address@hidden> wrote:
> On Sun, Jan 01, 2017 at 10:19:26PM -0500, Andrew J. Schorr wrote:
> > for (index in array)
> > delete array[index]
>
> Oops. Hermann Peifer pointed out in a private email that this code doesn't
> actually work, since "index" is a builtin function name that is reserved.
> My mistake for copying from the posix awk specification. How do we get
> them to fix the spec man page?
>
> Regards,
> Andy
I suspect that if you look at the actual POSIX page that the word "index" is
in italics, indicating that it should be replaced by an actual variable
name, just as "array" should be replaced by an actual array name.
If you still think it's a problem, I have a line into someone who can
help get this changed.
Thanks,
Arnold