summary refs log tree commit diff stats
path: root/doc/manual.txt
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-03-10 08:46:41 +0100
committerAraq <rumpf_a@web.de>2014-03-10 08:46:41 +0100
commitd4714ed14ee6bc2b2c58dc3e6a60246a76d4132f (patch)
treeffff54ab96066f765847f6f28f6dd50590d2163d /doc/manual.txt
parentdd216755ff61901eb0b08c56965f58fcabdf4a0e (diff)
downloadNim-d4714ed14ee6bc2b2c58dc3e6a60246a76d4132f.tar.gz
minor additions to the manual
Diffstat (limited to 'doc/manual.txt')
-rw-r--r--doc/manual.txt21
1 files changed, 17 insertions, 4 deletions
diff --git a/doc/manual.txt b/doc/manual.txt
index 8c8db7658..04c69cf94 100644
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -79,8 +79,21 @@ program execution. Unless explicitly classified, an error is a static error.
 
 A `checked runtime error`:idx: is an error that the implementation detects
 and reports at runtime. The method for reporting such errors is via *raising
-exceptions*. However, the implementation provides a means to disable these
-runtime checks. See the section pragmas_ for details.
+exceptions* or *dying with a fatal error*. However, the implementation 
+provides a means to disable these runtime checks. See the section pragmas_
+for details. 
+
+Wether a checked runtime error results in an exception or in a fatal error at
+runtime is implementation specific. Thus the following program is always
+invalid:
+
+.. code-block:: nimrod
+  var a: array[0..1, char]
+  let i = 5
+  try:
+    a[i] = 'N'
+  except EInvalidIndex:
+    echo "invalid index"
 
 An `unchecked runtime error`:idx: is an error that is not guaranteed to be
 detected, and can cause the subsequent behavior of the computation to
@@ -522,7 +535,7 @@ Strong spaces
 The number of spaces preceeding a non-keyword operator affects precedence
 if the experimental parser directive ``#!strongSpaces`` is used. Indentation
 is not used to determine the number of spaces. If 2 or more operators have the
-same number of preceeding spaces the precedence table applies, so ``1 + 3 * 4``
+same number of preceding spaces the precedence table applies, so ``1 + 3 * 4``
 is still parsed as ``1 + (3 * 4)``, but ``1+3 * 4`` is parsed as ``(1+3) * 4``:
 
 .. code-block:: nimrod
@@ -3481,7 +3494,7 @@ Declarative type classes are written in the following form:
       c.len is ordinal
       items(c) is iterator
       for value in c:
-        value.type is T
+        type(value) is T
 
 The type class will be matched if: