summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-07-19 16:38:46 +0200
committerAraq <rumpf_a@web.de>2012-07-19 16:38:46 +0200
commit98fd408adc1035fbd4ac8256f4c87acf5a9c62ae (patch)
tree2996455d0dae626135bcb91098c0af99f2b8d010 /doc
parentc9513c2e5a42e6a34e11568a708d3db80d2b6283 (diff)
downloadNim-98fd408adc1035fbd4ac8256f4c87acf5a9c62ae.tar.gz
implemented #133
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/manual.txt15
1 files changed, 12 insertions, 3 deletions
diff --git a/doc/manual.txt b/doc/manual.txt
index 36e444170..34389d7f9 100755
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -924,8 +924,8 @@ order.
 

 The assignment operator for tuples copies each component.

 The default assignment operator for objects copies each component. Overloading

-of the assignment operator for objects is not possible, but this may change in

-future versions of the compiler.

+of the assignment operator for objects is not possible, but this will change
+in future versions of the compiler.

 

 .. code-block:: nimrod

 

@@ -940,7 +940,16 @@ future versions of the compiler.
   person = ("Peter", 30)

 

 The implementation aligns the fields for best access performance. The alignment

-is compatible with the way the C compiler does it.

+is compatible with the way the C compiler does it. For consistency 
+with ``object`` declarations, tuples in a ``type`` section can also be defined
+with indentation instead of ``[]``:
+

+.. code-block:: nimrod

+

+  type

+    TPerson = tuple   # type representing a person

+      name: string    # a person consists of a name
+      age: natural    # and an age

 

 Objects provide many features that tuples do not. Object provide inheritance

 and information hiding. Objects have access to their type at runtime, so that