bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Sorted array scans


From: Davide Brini
Subject: Re: [bug-gawk] Sorted array scans
Date: Fri, 14 Oct 2011 10:44:32 +0200

On Thu, 13 Oct 2011 13:52:07 +0200, Jérôme Hénin <address@hidden> wrote:

> Hi everyone,
> 
> On my machine, the sorted array scans don't seem to work as
> documented. Using the example from the doc:
>      $ gawk 'BEGIN {
>      >    PROCINFO["sorted_in"] = "@str_ind_asc"
>      >    a[4] = 4
>      >    a[3] = 3
>      >    for (i in a)
>      >        print i, a[i]
>      > }'
>      -| 3 3
>      -| 4 4
> 
> I don't get the output above, but the reverse order. More generally,
> whatever I do, the PROCINFO["sorted_in"] value seems to be completely
> ignored, and I always get the same order.
> This is using GAWK 3.1.8 for GNU/Linux on x86_64.
> 
> Any idea what's happening?

Yes, you need gawk >= 4 for those features to work.

-- 
D.



reply via email to

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