bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] getline difference from gawk versions >=4.0.0


From: Aharon Robbins
Subject: Re: [bug-gawk] getline difference from gawk versions >=4.0.0
Date: Sun, 05 Aug 2012 14:11:37 +0300
User-agent: Heirloom mailx 12.4 7/29/08

Hi. I don't remember if I replied to this on the list or not.

> Date: Sun, 01 Apr 2012 11:49:33 +0100
> From: Duncan Moore <address@hidden>
> To: "address@hidden" <address@hidden>
> Subject: [bug-gawk] getline difference from gawk versions >=4.0.0
>
> Hi
>
> b.awk:
>
> BEGIN {
>    system("echo 1 > f")
>    while ((getline a[++c] < "f") > 0) {}
>    print c
> }
>
> gawk -f b.awk
>
> Prior to gawk 4.0.0 this outputs:
>
> 1
>
> For 4.0.0 and 4.0.1 it outputs:
>
> 2
>
> Regards
> Duncan Moore

I believe that gawk 4.0.x is correct.  I have documented this incompatibility
across implementations in the gawk-4.0-stable tree and added your program
to the test suite.

Thanks!

Arnold



reply via email to

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