summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorOscar Campbell <oscar@campbell.nu>2015-05-25 06:00:37 +0200
committerOscar Campbell <oscar@campbell.nu>2015-05-25 06:00:37 +0200
commit625299e861173266d0393ffdd76e66be9cb0c34d (patch)
tree1833bc6a520500fca7da1e4f7b67abee45e4aee2 /doc
parentfeff2bae680f4c63182069fee16162fe4e5f9d66 (diff)
downloadNim-625299e861173266d0393ffdd76e66be9cb0c34d.tar.gz
Change to hard word wrap at 80.
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/about.txt9
-rw-r--r--doc/manual/pragmas.txt8
-rw-r--r--doc/manual/procs.txt27
-rw-r--r--doc/manual/trmacros.txt6
4 files changed, 33 insertions, 17 deletions
diff --git a/doc/manual/about.txt b/doc/manual/about.txt
index 9f76ca9a8..8528ff978 100644
--- a/doc/manual/about.txt
+++ b/doc/manual/about.txt
@@ -2,13 +2,14 @@ About this document
 ===================
 
 **Note**: This document is a draft! Several of Nim's features may need more
-precise wording. This manual is constantly evolving until the 1.0 release and is not to be considered as the final proper specification.
+precise wording. This manual is constantly evolving until the 1.0 release and is
+not to be considered as the final proper specification.
 
 This document describes the lexis, the syntax, and the semantics of Nim.
 
-The language constructs are explained using an extended BNF, in
-which ``(a)*`` means 0 or more ``a``'s, ``a+`` means 1 or more ``a``'s, and
-``(a)?`` means an optional *a*. Parentheses may be used to group elements.
+The language constructs are explained using an extended BNF, in which ``(a)*``
+means 0 or more ``a``'s, ``a+`` means 1 or more ``a``'s, and ``(a)?`` means an
+optional *a*. Parentheses may be used to group elements.
 
 ``&`` is the lookahead operator; ``&a`` means that an ``a`` is expected but
 not consumed. It will be consumed in the following rule.
diff --git a/doc/manual/pragmas.txt b/doc/manual/pragmas.txt
index 2ce882495..51125f576 100644
--- a/doc/manual/pragmas.txt
+++ b/doc/manual/pragmas.txt
@@ -26,7 +26,8 @@ It can also be used as a statement, in that case it takes a list of *renamings*.
     Stream = ref object
   {.deprecated: [TFile: File, PStream: Stream].}
 
-The ``nimfix`` tool can be used to, without effort, automatically update your code and refactor it by performing these renamings.
+The ``nimfix`` tool can be used to, without effort, automatically update your
+code and refactor it by performing these renamings.
 
 
 noSideEffect pragma
@@ -430,7 +431,10 @@ Example:
   of the symbols may include other call expressions, whose types will be resolved
   at this point too.
 
-  3. Finally, after the best overload is picked, the compiler will start compiling the body of the respective symbol. This in turn will lead the compiler to discover more call expressions that need to be resolved and steps 2 and 3 will be repeated as necessary.
+  3. Finally, after the best overload is picked, the compiler will start
+  compiling the body of the respective symbol. This in turn will lead the
+  compiler to discover more call expressions that need to be resolved and steps
+  2 and 3 will be repeated as necessary.
 
   Please note that if a callable symbol is never used in this scenario, its body
   will never be compiled. This is the default behavior leading to best compilation
diff --git a/doc/manual/procs.txt b/doc/manual/procs.txt
index 7884b9c32..b76300e89 100644
--- a/doc/manual/procs.txt
+++ b/doc/manual/procs.txt
@@ -2,9 +2,14 @@ Procedures
 ==========
 
 What most programming languages call `methods`:idx: or `functions`:idx: are
-called `procedures`:idx: in Nim (which is the correct terminology). A
-procedure declaration consists of an identifier, zero or more formal parameters, a return value type and a block of code.
-Formal parameters are declared as a list of identifiers separated by either comma or semicolon. A parameter is given a type by ``: typename``. The type applies to all parameters immediately before it, until either the beginning of the parameter list, a semicolon separator or an already typed parameter, is reached. The semicolon can be used to make separation of types and subsequent identifiers more distinct.
+called `procedures`:idx: in Nim (which is the correct terminology). A procedure
+declaration consists of an identifier, zero or more formal parameters, a return
+value type and a block of code. Formal parameters are declared as a list of
+identifiers separated by either comma or semicolon. A parameter is given a type
+by ``: typename``. The type applies to all parameters immediately before it,
+until either the beginning of the parameter list, a semicolon separator or an
+already typed parameter, is reached. The semicolon can be used to make
+separation of types and subsequent identifiers more distinct.
 
 .. code-block:: nim
   # Using only commas
@@ -16,23 +21,26 @@ Formal parameters are declared as a list of identifiers separated by either comm
   # Will fail: a is untyped since ';' stops type propagation.
   proc foo(a; b: int; c, d: bool): int
 
-A parameter may be declared with a default value which is used if the caller does not provide a value for the argument.
+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
 
-Parameters can be declared mutable and so allow the proc to modify those arguments, by using the type modifier `var`.
+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 =
     outp = inp + 47
 
-If the proc declaration has no body, it is a `forward`:idx: declaration. If
-the proc returns a value, the procedure body can access an implicitly declared
+If the proc declaration has no body, it is a `forward`:idx: declaration. If the
+proc returns a value, the procedure body can access an implicitly declared
 variable named `result`:idx: that represents the return value. Procs can be
-overloaded. The overloading resolution algorithm determines which proc is the best match for the arguments. Example:
+overloaded. The overloading resolution algorithm determines which proc is the
+best match for the arguments. Example:
 
 .. code-block:: nim
 
@@ -530,7 +538,8 @@ Closure iterators have other restrictions than inline iterators:
 
 1. ``yield`` in a closure iterator can not occur in a ``try`` statement.
 2. For now, a closure iterator cannot be evaluated at compile time.
-3. ``return`` is allowed in a closure iterator (but rarely useful) and ends iteration..
+3. ``return`` is allowed in a closure iterator (but rarely useful) and ends 
+   iteration..
 4. Neither inline nor closure iterators can be recursive.
 
 Iterators that are neither marked ``{.closure.}`` nor ``{.inline.}`` explicitly
diff --git a/doc/manual/trmacros.txt b/doc/manual/trmacros.txt
index a5a9fe3e0..067349c30 100644
--- a/doc/manual/trmacros.txt
+++ b/doc/manual/trmacros.txt
@@ -43,7 +43,8 @@ Fortunately Nim supports side effect analysis:
   
   echo f() * 2 # not optimized ;-)
 
-You can make one overload for constrained match and without, and the constrained will be prioritized, and so you can handle both cases differently.
+You can make one overload for constrained match and without, and the constrained
+will be prioritized, and so you can handle both cases differently.
 
 So what about ``2 * a``? We should tell the compiler ``*`` is commutative. We
 cannot really do that however as the following code only swaps arguments
@@ -107,10 +108,11 @@ Predicate                Meaning
                          with the marked parameter.
 ===================      =====================================================
 
+Predicates that share their name with a keyword have to be escaped with 
+backticks: `` `const` ``.
 The ``alias`` and ``noalias`` predicates refer not only to the matching AST,
 but also to every other bound parameter; syntactically they need to occur after
 the ordinary AST predicates:
-Predicates that share their name with a keyword have to be escaped with backticks: `` `const` ``.
 
 .. code-block:: nim
   template ex{a = b + c}(a: int{noalias}, b, c: int) =