diff options
author | Araq <rumpf_a@web.de> | 2012-07-19 17:38:52 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-07-19 17:38:52 +0200 |
commit | 39235e21f543b2b9bc556fbaaed03232622a1b61 (patch) | |
tree | 1c56191642b61e960e0e7263d0c47004454f24aa /doc | |
parent | 98fd408adc1035fbd4ac8256f4c87acf5a9c62ae (diff) | |
download | Nim-39235e21f543b2b9bc556fbaaed03232622a1b61.tar.gz |
bugfixes for the symbol mangling; implements #129
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/manual.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/manual.txt b/doc/manual.txt index 34389d7f9..cd6828e5f 100755 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -1095,6 +1095,18 @@ dereferencing operations for reference types: new(n) n.data = 9 # no need to write n[].data; in fact n[].data is highly discouraged! + +As a syntactical extension ``object`` types can be anonymous if +declared in a type section via the ``ref object`` or ``ptr object`` notations. +This feature is useful if an object should only gain reference semantics: + +.. code-block:: nimrod + + type + Node = ref object + le, ri: Node + data: int + To allocate a new traced object, the built-in procedure ``new`` has to be used. To deal with untraced memory, the procedures ``alloc``, ``dealloc`` and |