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]

[Bug manual/14695] Wrong printf("%3s"...) Example --- manual subsection "12.12.6 Other Output Conversions"


http://sourceware.org/bugzilla/show_bug.cgi?id=14695

--- Comment #7 from R N Alx <lascania at gmail dot com> 2012-10-10 11:15:39 UTC ---
(In reply to comment #6)
> Just a question: Shouldn't the manual say "field width" instead of precision?
> 
> This is an example of a field of with 3:
> printf ("%3s",...)

Your example is wrong, because you must put a dot before three, .3, if you want
to printf() only the first three3 characters of a string !

The manual should say something like, "to output less than the width of a
string use the precision option .n to output only first n characters from a
string".

Regarding numbers, the manual should continue use precision.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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