summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorReneSac <reneduani@yahoo.com.br>2014-04-19 13:31:55 -0300
committerReneSac <reneduani@yahoo.com.br>2014-04-19 13:31:55 -0300
commit56a6928635917c92ca8953a6203efadcde78044f (patch)
tree8cb357a69fb99eb6557ac4d430edfeccda1be542 /doc
parente2fe9dd9abb9ce258285c6f3717f5089fb64bbb9 (diff)
downloadNim-56a6928635917c92ca8953a6203efadcde78044f.tar.gz
Referential data types may need to be declared.
And other small fixes.
Diffstat (limited to 'doc')
-rw-r--r--doc/tut1.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/tut1.txt b/doc/tut1.txt
index 8d7a252eb..46eda7ae3 100644
--- a/doc/tut1.txt
+++ b/doc/tut1.txt
@@ -148,12 +148,12 @@ the syntax, watch their indentation:
     # comment has not the correct indentation level -> syntax error!
 
 **Note**: To comment out a large piece of code, it is often better to use a
-``when false:`` statement. 
+``when false:`` statement.
 
 .. code-block:: nimrod
   when false:
     brokenCode()
-    
+
 Another option is to use the `discard`_ statement together with
 *long string literals* to create block comments:
 
@@ -161,7 +161,6 @@ Another option is to use the `discard`_ statement together with
   discard """ You can have any nimrod code text commented 
   out inside this with no indentation restrictions.
         yes("May I ask a pointless question?") """
-        
 
 
 Numbers
@@ -606,9 +605,11 @@ the exit.
   echo sumTillNegative(3, 4 , -1 , 6) # echos 7
 
 The ``result`` variable is already implicitly declared at the start of the 
-function and initialised with the type's default value, so declaring it again 
-with 'var return', for example, would shadow it with a normal variable of the
-same name.
+function, so declaring it again with 'var result', for example, would shadow it
+with a normal variable of the same name. The result variable is also already
+initialised with the type's default value. Note that referential data types will
+be ``nil`` at the start of the procedure, and thus may require manual
+initialisation.
 
       
 Parameters