mirror of https://github.com/mkerrisk/man-pages
man-pages.7: Add some notes on comments in example code
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
1297239d41
commit
f18f9c4095
|
@ -949,7 +949,15 @@ Example programs should ideally be short
|
|||
though in some cases longer programs may be necessary
|
||||
to properly illustrate the use of an API.
|
||||
.IP *
|
||||
Expressive code and useful comments are appreciated.
|
||||
Expressive code is appreciated.
|
||||
.IP *
|
||||
Comments should included where helpful.
|
||||
Complete sentences in free-standing comments should be
|
||||
terminated by a period.
|
||||
Periods should generally be omitted in "tag" comments
|
||||
(i.e., comments that are placed on the same line of code);
|
||||
such comments are in any case typically brief phrases
|
||||
rather than complete sentences.
|
||||
.IP *
|
||||
Example programs should do error checking after system calls and
|
||||
library function calls.
|
||||
|
|
Loading…
Reference in New Issue