mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 14:23:45 +00:00
fix #3418 add example on openArray to types.txt
This commit is contained in:
@@ -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
|
||||
-------
|
||||
|
||||
Reference in New Issue
Block a user