summary refs log tree commit diff stats
path: root/doc/manual
diff options
context:
space:
mode:
authorJamesP <jlp765@gmail.com>2015-10-05 10:42:04 +1000
committerJamesP <jlp765@gmail.com>2015-10-05 10:42:04 +1000
commitaead71cd67f17b781ad4f8a496fccc10a801efa2 (patch)
treeb40852350b5a232b49bd3a493dc2e5f898c24bf3 /doc/manual
parent6587f63672dacb732b879d517132bec8a4f862e4 (diff)
downloadNim-aead71cd67f17b781ad4f8a496fccc10a801efa2.tar.gz
fix #3418 add example on openArray to types.txt
Diffstat (limited to 'doc/manual')
-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
 -------