bug-gawk
[Top][All Lists]
Advanced

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

Re: Bugs in printf/sprintf formatted output


From: arnold
Subject: Re: Bugs in printf/sprintf formatted output
Date: Tue, 09 Jul 2024 02:02:36 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Hi.

"Maciej W. Rozycki" <macro@redhat.com> wrote:

>  My suggestion would be making a separate test case (unless GAWK has one 
> already, but your inclusion of the two inputs in `printf-corners.awk' 
> suggests that it doesn't) that covers various inputs of "inf" and "nan" 
> with and without a sign prepended, with and without the `+' and `space' 
> flags, run both in the conventional (or GNU) and in the POSIX mode of 
> GAWK, so that expectations for both modes are covered and things don't 
> accidentally change in the future.  I guess I could have a look into it 
> myself, but I can't commit to a specific timeline.

If you could, I would appreciate it. I am currently refactoring the printf
code, which is a big inline mess. It's taking a lot of my time.

>  NB I have learnt POSIX.1-2024 has been just released to IEEE members and 
> the corresponding HTML version of The Open Group Base Specifications Issue 
> 8 will follow shortly (~July 21st was named).  I guess it will include the 
> `B' and `b' conversions I mentioned before, both for C usage, obviously, 
> and supposedly for AWK as well.

I currently don't plan to add %b or %B. I feel like printing binary
from awk makes little sense, as all awk numbers are floating point. Also,
I doubt that any other awk version is going to add %b/%B anytime soon,
either, and gawk is already enough different from other awks that there's
no reason to add (and have to document!) yet another difference.

Thanks,

Arnold



reply via email to

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