summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-08-16 17:54:11 +0200
committerAraq <rumpf_a@web.de>2012-08-16 17:54:11 +0200
commite4c432387eb80817ed2557cfbd100be7fb0525e7 (patch)
tree29e53187e77f75d56d5aff334e17b9bba6db45b9 /doc
parentd37fe6e0a5cc414c24dbff485ee656cc6f16eed8 (diff)
downloadNim-e4c432387eb80817ed2557cfbd100be7fb0525e7.tar.gz
bycopy/byref for object/tuple types
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/manual.txt21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/manual.txt b/doc/manual.txt
index ed80984d7..5933691b0 100755
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -2836,7 +2836,7 @@ Ordinary vs immediate templates
 
 There are two different kinds of templates: `immediate`:idx: templates and
 ordinary templates. Ordinary templates take part in overloading resolution. As
-such their arguments needs to be type checked before the template is invoked.
+such their arguments need to be type checked before the template is invoked.
 So ordinary templates cannot receive undeclared identifiers:
 
 .. code-block:: nimrod
@@ -3657,6 +3657,25 @@ identifier *exactly as spelled*:
 

 Note that this pragma is somewhat of a misnomer: Other backends will provide

 the same feature under the same name.

+
+
+Bycopy pragma
+-------------
+
+The `bycopy`:idx: pragma can be applied to an object or tuple type and
+instructs the compiler to pass the type by value to procs:
+
+.. code-block:: nimrod
+  type
+    TVector {.bycopy, pure.} = object
+      x, y, z: float
+
+
+Byref pragma
+------------
+
+The `byref`:idx: pragma can be applied to an object or tuple type and instructs
+the compiler to pass the type by reference (hidden pointer) to procs.
 

 

 Varargs pragma