From aead71cd67f17b781ad4f8a496fccc10a801efa2 Mon Sep 17 00:00:00 2001 From: JamesP Date: Mon, 5 Oct 2015 10:42:04 +1000 Subject: [PATCH] fix #3418 add example on openArray to types.txt --- doc/manual/types.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/manual/types.txt b/doc/manual/types.txt index c9ac6f0628..babf3286f2 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 -------