quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] gawk 3.0.6 doesn't support asort


From: Andreas Gruenbacher
Subject: Re: [Quilt-dev] gawk 3.0.6 doesn't support asort
Date: Tue, 6 Sep 2005 08:34:53 +0200
User-agent: KMail/1.7.1

On Tuesday 06 September 2005 07:42, Jean Delvare wrote:
> Hi Andreas,
>
> [Jean Delvare]
>
> > >           END     {
> > > -           i = 1
> > > -           for (file in files) {
> > > -             if (!(file in printed)) {
> > > -               new_files[i]=file
> > > -               i++
> > > -             }
> > > -           }
> > > -           n = asort(new_files)
> > >             for (i=1; i<=n; i++)
>
> [Andreas Gruenbacher]
>
> > "i<=n" needs to be changed to "i in new_files" as well,
>
> I don't think so. My awk manual states that the "var in array" type
> loops have no guaranteed ordering.

I meant this:
  for (i=1; n in new_files; i++)

but I see now that n is well-defined, and so the loop is fine, as is the rest 
of the patch. I must have had a confused hour.

> > and new_files also should be removed completely.
>
> What do to mean exactly please?

I thought we could get rid of this array completely. It seems we can't. The 
patch is fine as it is, thanks.

-- Andreas.




reply via email to

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