Updated to capitalized, imperative
This commit is contained in:
parent
13dd7922aa
commit
c4fb1246d1
1 changed files with 20 additions and 6 deletions
|
|
@ -148,7 +148,7 @@ syntax for including examples.
|
||||||
.. code-block:: nim
|
.. code-block:: nim
|
||||||
|
|
||||||
proc someproc*(): string =
|
proc someproc*(): string =
|
||||||
## returns "something"
|
## Return "something"
|
||||||
##
|
##
|
||||||
## .. code-block:: nim
|
## .. code-block:: nim
|
||||||
##
|
##
|
||||||
|
|
@ -165,15 +165,29 @@ first appearance of the proc.
|
||||||
.. code-block:: nim
|
.. code-block:: nim
|
||||||
|
|
||||||
proc hello*(): string
|
proc hello*(): string
|
||||||
## Documentation goes here
|
## Put documentation here
|
||||||
proc nothing() = discard
|
proc nothing() = discard
|
||||||
proc hello*(): string =
|
proc hello*(): string =
|
||||||
## This documentation is ignored
|
## Ignore this
|
||||||
echo "hello"
|
echo "hello"
|
||||||
|
|
||||||
Capitalization of the first letter on the first line is optional. As a general
|
The preferred documentation style is to begin with a capital letter and use
|
||||||
rule, if the documentation begins with a full sentence, capitalize it;
|
the imperative (command) form. That is, between:
|
||||||
otherwise, a lowercase letter is preferred.
|
|
||||||
|
.. code-block:: nim
|
||||||
|
|
||||||
|
proc hello*(): string =
|
||||||
|
# Return "hello"
|
||||||
|
result = "hello"
|
||||||
|
or
|
||||||
|
|
||||||
|
.. code-block:: nim
|
||||||
|
|
||||||
|
proc hello*(): string =
|
||||||
|
# says hello
|
||||||
|
result = "hello"
|
||||||
|
|
||||||
|
the first is preferred.
|
||||||
|
|
||||||
The Git stuff
|
The Git stuff
|
||||||
=============
|
=============
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue