Merge pull request #3420 from jlp765/manual1
fix #3418 add example on openArray to types.txt
This commit is contained in:
commit
0a8a2070d0
1 changed files with 5 additions and 0 deletions
|
|
@ -490,6 +490,11 @@ to an open array parameter.
|
||||||
The openarray type cannot be nested: multidimensional openarrays are not
|
The openarray type cannot be nested: multidimensional openarrays are not
|
||||||
supported because this is seldom needed and cannot be done efficiently.
|
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
|
Varargs
|
||||||
-------
|
-------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue