bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: might be a bug in gawk


From: Aharon Robbins
Subject: Re: might be a bug in gawk
Date: Fri, 27 Mar 2009 11:05:10 +0300

Hi All.

> Date: Wed, 25 Mar 2009 11:28:02 -0700
> From: Micah Cowan <address@hidden>
> To: Andreas Schwab <address@hidden>
> CC: Dave B <address@hidden>, address@hidden
> Subject: Re: might be a  bug  in  gawk
>
> >>> There is no formatting directive that reqires an argument.  %28b is
> >>> unknown and %29% is treated the same as %%. 
> >> Where is that documented?
> > 
> > Nowhere.  Both are undefined.
>
> To be pedantic, %29% is not undefined, AFAICT: % is an ordinary
> conversion specifier, and I don't see anything anywhere that says it
> can't take a field width (but neither would I particularly expect
> real-world implementations to behave appropriately with them).
>
> - --
> Micah J. Cowan
> Programmer, musician, typesetting enthusiast, gamer.
> Maintainer of GNU Wget and GNU Teseq
> http://micah.cowan.name/

Here is what's in the gawk code:

                case '%':
                        need_format = FALSE;
                        /*
                         * 29 Oct. 2002:
                         * The C99 standard pages 274 and 279 seem to imply that
                         * since there's no arg converted, the field width 
doesn't
                         * apply.  The code already was that way, but this
                         * comment documents it, at least in the code.
                         */
                        ...

HTH,

Arnold




reply via email to

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