1.3.1: printf bug in awk?

Troy Noble troy.noble@channelpoint.com
Wed Nov 7 09:48:00 GMT 2001


I should mention I also tested gawk 3.0.5 and it was fixed there
as well, although 3.1.0 is the latest.

And I mistakenly pasted in the wrong test case output.  I was trying both
%10.0f and %10.0g to see if that made a difference.  Got the same result
either way.  Sorry to send two messages, thought I should clarify that
though.

Troy

-----Original Message-----
From: Troy Noble [ mailto:troy.noble@channelpoint.com ]
Sent: Wednesday, November 07, 2001 10:40 AM
To: 'Morten Nygaard Aasnes'; cygwin@cygwin.com
Subject: RE: 1.3.1: printf bug in awk?


Seems like a gawk bug, not specific to cygwin.  I get the
same result with gawk 3.0.4 on Linux and Solaris:

bash-2.04$ awk 'BEGIN {printf "%10.0f\n",3.14; exit}'
0000000003

Seems to be fixed in gawk-3.1.0 at least.  I just downloaded and
built it with latest cygwin and I get:

.../gawk-3.1.0$ ./gawk.exe 'BEGIN {printf "%10.0g\n",3.14; exit}'
         3

Perhaps you could convince the cygwin gawk package maintainer to
update to 3.1.0.  But in the meantime, you can compile 3.1.0 yourself
to work around the problem.  If you've done a full cygwin install,
it's literally as simple as download and then ./configure ; make 

Troy

-----Original Message-----
From: Morten Nygaard Aasnes [ mailto:mortenn@imr.no ]
Sent: Wednesday, November 07, 2001 9:53 AM
To: cygwin@cygwin.com
Subject: 1.3.1: printf bug in awk?

---- snip

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list