summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorOscar Campbell <oscar@campbell.nu>2015-05-26 16:28:44 +0200
committerOscar Campbell <oscar@campbell.nu>2015-05-26 16:28:44 +0200
commitc593c476965d8f019a86b51987aa62a685040d39 (patch)
tree6a3008c1106c892a9e7527d994a6dd82ccc9bcee /doc
parent910dce70d6748b41ffbc39c731592716609c33f7 (diff)
downloadNim-c593c476965d8f019a86b51987aa62a685040d39.tar.gz
Fix introduced erroneous use of "canonical" back to original wording. Fix faulty description of proc params behavior. Remove 'null' return type in example.
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/procs.txt7
-rw-r--r--doc/manual/trmacros.txt2
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/manual/procs.txt b/doc/manual/procs.txt
index fb2c7a108..38e343686 100644
--- a/doc/manual/procs.txt
+++ b/doc/manual/procs.txt
@@ -25,15 +25,16 @@ A parameter may be declared with a default value which is used if the caller
 does not provide a value for the argument.
 
 .. code-block:: nim
-  # b is optional, 47 is its default value
-  proc foo(a, b: int = 47): int
+  # b is optional with 47 as its default value
+  proc foo(a: int, b: int = 47): int
 
 Parameters can be declared mutable and so allow the proc to modify those
 arguments, by using the type modifier `var`.
 
 .. code-block:: nim
   # "returning" a value to the caller through the 2nd argument
-  proc foo(inp: int, outp: var int): void =
+  # Notice that the function uses no actual return value at all (ie void)
+  proc foo(inp: int, outp: var int) =
     outp = inp + 47
 
 If the proc declaration has no body, it is a `forward`:idx: declaration. If the
diff --git a/doc/manual/trmacros.txt b/doc/manual/trmacros.txt
index de98e3a46..5ff24a36a 100644
--- a/doc/manual/trmacros.txt
+++ b/doc/manual/trmacros.txt
@@ -54,7 +54,7 @@ blindly:
 .. code-block:: nim
   template mulIsCommutative{`*`(a, b)}(a, b: int): int = b*a
   
-What optimizers really need to do is a *canonization*:
+What optimizers really need to do is a *canonicalization*:
 
 .. code-block:: nim
   template canonMul{`*`(a, b)}(a: int{lit}, b: int): int = b*a