This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug libc/2194] New: printf: meaning of precision for 'd', 'i', 'o', 'u', 'x', 'X' directives


"bruno at clisp dot org" <sourceware-bugzilla@sourceware.org> writes:

> Expected output according to POSIX: 
>  
> 0.000.000.001 
> 0.000.000.012 
> 0.000.000.123 
> 0.000.001.234 
> 0.000.012.345 
> 0.000.123.456 
> 0.001.234.567 
> 0.012.345.678 
> 0.123.456.789 
> 1.234.567.890 
> 12.345.678.901 
> 123.456.789.012 

Why do you think the grouping characters should be inserted after the
padding?  POSIX says in the description of the '0' flag:

    If the â0â and âââ flags both appear, the grouping characters are
    inserted before zero padding.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]