summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-04-22 19:56:26 +0200
committerAraq <rumpf_a@web.de>2013-04-22 19:56:26 +0200
commit3c27d1a1793278ffdb6c2e8d9e9d6dc5ccf7c95d (patch)
tree972033640f12285e081582130e8d90625e85c6f9 /doc
parent8dc9ad7ce3602c9a147b326fe74c656828c3f292 (diff)
parentfcb4344ac5996e65b41b82ae472c29eabdda09b5 (diff)
downloadNim-3c27d1a1793278ffdb6c2e8d9e9d6dc5ccf7c95d.tar.gz
Merge branch 'master' into newparser
Diffstat (limited to 'doc')
-rw-r--r--doc/advopt.txt2
-rw-r--r--doc/nimrodc.txt19
-rw-r--r--doc/tut1.txt18
3 files changed, 38 insertions, 1 deletions
diff --git a/doc/advopt.txt b/doc/advopt.txt
index bfeee0c64..38461244d 100644
--- a/doc/advopt.txt
+++ b/doc/advopt.txt
@@ -78,5 +78,5 @@ Advanced options:
   --listCmd                 list the commands used to execute external programs
   --parallelBuild=0|1|...   perform a parallel build
                             value = number of processors (0 for auto-detect)
-  --verbosity:0|1|2|3       set Nimrod's verbosity level (0 is default)
+  --verbosity:0|1|2|3       set Nimrod's verbosity level (1 is default)
   -v, --version             show detailed version information
diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt
index 06d447b7e..179de3b04 100644
--- a/doc/nimrodc.txt
+++ b/doc/nimrodc.txt
@@ -68,6 +68,25 @@ ShadowIdent                      A local variable shadows another local
 User                             Some user defined warning.
 ==========================       ============================================
 
+
+Verbosity levels
+----------------
+
+=====  ============================================
+Level  Description
+=====  ============================================
+0      Minimal output level for the compiler.
+1      Displays compilation of all the compiled files, including those imported
+       by other modules or through the `compile pragma<#compile-pragma>`_.
+       This is the default level.
+2      Displays compilation statistics, enumerates the dynamic
+       libraries that will be loaded by the final binary and dumps to
+       standard output the result of applying `a filter to the source code
+       <filters.html>`_ if any filter was used during compilation.
+3      In addition to the previous levels dumps a debug stack trace
+       for compiler developers.
+=====  ============================================
+
 

 Configuration files

 -------------------

diff --git a/doc/tut1.txt b/doc/tut1.txt
index 746d11f01..7c2a35f94 100644
--- a/doc/tut1.txt
+++ b/doc/tut1.txt
@@ -1311,6 +1311,24 @@ integer.
   echo(person[0]) # "Peter"
   echo(person[1]) # 30
 
+  # You don't need to declare tuples in a separate type section.
+  var building: tuple[street: string, number: int]
+  building = ("Rue del Percebe", 13)
+  echo(building.street)
+  
+  # The following line does not compile, they are different tuples!
+  #person = building
+  # --> Error: type mismatch: got (tuple[street: string, number: int])
+  #     but expected 'TPerson'
+  
+  # The following works because the field names and types are the same.
+  var teacher: tuple[name: string, age: int] = ("Mark", 42)
+  person = teacher
+
+Even though you don't need to declare a type for a tuple to use it, tuples
+created with different field names will be considered different objects despite
+having the same field types.
+
 
 Reference and pointer types
 ---------------------------