Commas in 'c' printf
Michael Hipp
Michael
Mon May 17 11:55:40 PDT 2004
Michael Hipp wrote:
> Kurt Wall wrote:
>
>> See setlocale(3), printf(3), locale(1), locale(5), and locale(7).
>> Note that the single quote between % and d is correct...
>
>
> Thanks. My reference book doesn't tell about the single quote.
Ok, I should have looked at the man page for printf:
----------
The five flag characters above are defined in the C standard. The SUSv2
specifies one further flag character.
'
For decimal conversion (i, d, u, f, F, g, G) the output is to be grouped
with thousands' grouping characters if the locale information indicates
any. Note that many versions of gcc cannot parse this option and will
issue a warning. SUSv2 does not include %'F. instead of relying on my book:
----------
What is SUSv2? My book covers C99 which I thought was nearly the last
word on the subject.
I suppose I need to be more reliant on the electronic documentation even
tho a book is so often more convenient.
Thanks again,
Michael
More information about the Linux-users
mailing list