public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/14695] New: Wrong printf("%3s"...) Example --- manual subsection "12.12.6 Other Output Conversions"
@ 2012-10-10  9:39 lascania at gmail dot com
  2012-10-10  9:43 ` [Bug manual/14695] " lascania at gmail dot com
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: lascania at gmail dot com @ 2012-10-10  9:39 UTC (permalink / raw)
  To: glibc-bugs


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.


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-06-17  4:04 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-10  9:39 [Bug manual/14695] New: Wrong printf("%3s"...) Example --- manual subsection "12.12.6 Other Output Conversions" lascania at gmail dot com
2012-10-10  9:43 ` [Bug manual/14695] " lascania at gmail dot com
2012-10-10  9:46 ` lascania at gmail dot com
2012-10-10 10:01 ` schwab@linux-m68k.org
2012-10-10 10:28 ` lascania at gmail dot com
2012-10-10 10:42 ` schwab@linux-m68k.org
2012-10-10 10:58 ` lascania at gmail dot com
2012-10-10 11:00 ` lascania at gmail dot com
2012-10-10 11:06 ` aj at suse dot de
2012-10-10 11:16 ` lascania at gmail dot com
2012-10-10 11:59 ` schwab@linux-m68k.org
2012-10-10 12:16 ` lascania at gmail dot com
2012-10-10 12:33 ` schwab@linux-m68k.org
2012-10-11 11:31 ` lascania at gmail dot com
2012-10-11 11:53 ` schwab@linux-m68k.org
2012-10-11 13:18 ` aj at suse dot de
2012-10-11 14:57 ` lascania at gmail dot com
2012-10-11 15:04 ` lascania at gmail dot com
2012-10-11 16:15 ` schwab@linux-m68k.org
2012-10-11 16:51 ` ldv at altlinux dot org
2012-10-11 17:02 ` schwab@linux-m68k.org
2012-10-12 12:16 ` lascania at gmail dot com
2012-10-12 16:22 ` [Bug manual/14695] no example on printf precision " ldv at altlinux dot org
2014-06-17  4:04 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).