This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug manual/14695] New: 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 09:38:44 +0000
- Subject: [Bug manual/14695] New: Wrong printf("%3s"...) Example --- manual subsection "12.12.6 Other Output Conversions"
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14695
Bug #: 14695
Summary: Wrong printf("%3s"...) Example --- manual subsection
"12.12.6 Other Output Conversions"
Product: glibc
Version: unspecified
Status: NEW
Severity: minor
Priority: P2
Component: manual
AssignedTo: unassigned@sourceware.org
ReportedBy: lascania@gmail.com
CC: mtk.manpages@gmail.com, roland@gnu.org
Classification: Unclassified
Created attachment 6678
--> http://sourceware.org/bugzilla/attachment.cgi?id=6678
picture of the manual page with wrong printf() example
glibc manual chapter "12. I/O on Streams"
section "12.12 Formatted Output"
subsection "12.12.6 Other Output Conversions" contains the following example
line:
"printf ("%3s%-6s", "no", "where");"
this example is incorrect because there are two missing dots that are used to
specify the precision of the output, how may characters printf() outputs.
The correct version is:
"printf ("%.3s%-.6s", "no", "where");"
observe the dot inside %.3s and the second dot inside %-.6s !
Check the attached .gif image for better clarification !
--
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.