[Top][All Lists]

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

Re: [bug-gawk] Sorted array scans

From: Hermann Peifer
Subject: Re: [bug-gawk] Sorted array scans
Date: Fri, 14 Oct 2011 11:21:27 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

On 14/10/2011 10:44, Davide Brini wrote:
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.

...and use one of the available special values:





reply via email to

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