summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2015-10-05 17:29:33 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2015-10-05 17:29:33 +0100
commit0a8a2070d01489d036ececa78c87ef94325d3e9d (patch)
treeb40852350b5a232b49bd3a493dc2e5f898c24bf3
parent6587f63672dacb732b879d517132bec8a4f862e4 (diff)
parentaead71cd67f17b781ad4f8a496fccc10a801efa2 (diff)
downloadNim-0a8a2070d01489d036ececa78c87ef94325d3e9d.tar.gz
Merge pull request #3420 from jlp765/manual1
fix #3418 add example on openArray to types.txt
-rw-r--r--doc/manual/types.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/manual/types.txt b/doc/manual/types.txt
index c9ac6f062..babf3286f 100644
--- a/doc/manual/types.txt
+++ b/doc/manual/types.txt
@@ -490,6 +490,11 @@ to an open array parameter.
 The openarray type cannot be nested: multidimensional openarrays are not
 supported because this is seldom needed and cannot be done efficiently.
 
+.. code-block:: nim
+  proc testOpenArray(x: openArray[int]) = echo repr(x)
+
+  testOpenArray([1,2,3])  # array[]
+  testOpenArray(@[1,2,3]) # seq[]
 
 Varargs
 -------