This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug manual/14695] Wrong printf("%3s"...) Example --- manual subsection "12.12.6 Other Output Conversions"
- From: "lascania at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Wed, 10 Oct 2012 10:28:12 +0000
- Subject: [Bug manual/14695] Wrong printf("%3s"...) Example --- manual subsection "12.12.6 Other Output Conversions"
- Auto-submitted: auto-generated
- References: <bug-14695-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14695
R N Alx <lascania at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #2 from R N Alx <lascania at gmail dot com> 2012-10-10 10:28:12 UTC ---
Mr Schwab,
This example code, is not my own, not-my-own example !
printf ("%3s%-6s", "no", "where")
this example is writen in the manual, it is writen wrong inside the online
manual.
I filled this bug because I want the online manual subsection "12.12.6 Other
Output Conversions" to be changed because of two reasons:
1. reason one
there are missing two dots, %3.s and %-.6s
2. reason two
printf ("%.3s%-.6s", "no", "where") does YES YES YES produce " nowhere ".
but not because of the output conversion arguments .3 and -.6, but because
these two strings are only two characters and five characters long, thus the
output conversion arguments .3 and -.6 have no influence
but if the online manual is changed to:
printf ("%.3s%-.6s", "noOoO", "whereEeEeEeE")
the result will be " noOwhereE "
which is what the online manual is trying to explain how printf() is using
output conversion arguments to cut strings
CHECK THE .GIF IMAGE
http://sourceware.org/bugzilla/attachment.cgi?id=6678
CHECK THE ONLINE MANUAL
http://www.gnu.org/software/libc/manual/html_node/Other-Output-Conversions.html#Other-Output-Conversions
Thanx
--
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.