[Bug 891854] Re: Typo in the scanf documentation (man)
Daniel Holbach
daniel.holbach at ubuntu.com
Mon Feb 27 09:29:14 UTC 2012
This seems to be fixed upstream in 3.36 upstream.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to manpages in Ubuntu.
https://bugs.launchpad.net/bugs/891854
Title:
Typo in the scanf documentation (man)
Status in “manpages” package in Ubuntu:
Fix Committed
Bug description:
Version used :
-------------------
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
Observed behaviour:
-------------------
$ man scanf
There is a typo in the scanf documentation
In the section "Note", there is a code example.
The last instruction of this code example reads:
fprintf(stderr, "No matching characters\n"):
As is, the example won't compile.
Reproduce-able & How to reproduce:
-------------------
Yes & copy/paste the example in any text file, compile it (gcc), and observe.
Expected behaviour:
-------------------
The example should compile!
So if we write instead
fprintf(stderr, "No matching characters\n");
Basically, replace the : (colon) by a ; (semicolon) the example nows compiles.
Severity:
-------------
Minor...
Because any 'reasonably trained' C/C++ programmer should fix the bug by itself in a few seconds.
... but examples given in manual should work, shouldn't they?
Personal observation:
------------------
Although the example compiles once the correction done, the 'a' modifier seams to have a lot of constraints and is not 'standard'; whereas it is explained after the example that 'm' modifier will be Posix and have many more advantages.
Thus shouldn't the text about 'm' be before the example and the
example be given with 'm' instead of 'a' as this seams the 'right'
modifier to use (do people agree it is the best practice?) and 'a'
looks sort of dangerous & deprecated.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/manpages/+bug/891854/+subscriptions
More information about the foundations-bugs
mailing list