fix #3418 add example on openArray to types.txt

This commit is contained in:
JamesP
2015-10-05 10:42:04 +10:00
parent 6587f63672
commit aead71cd67

View File

@@ -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
-------