Edits to sections 'Open arrays' and 'varargs'. (#20140)
This commit is contained in:
parent
da267911ec
commit
02cbd7dc53
1 changed files with 6 additions and 6 deletions
|
|
@ -1535,7 +1535,7 @@ a compatible base type can be passed to an openarray parameter, the index
|
|||
type does not matter. In addition to arrays, sequences can also be passed
|
||||
to an open array parameter.
|
||||
|
||||
The openarray type cannot be nested: multidimensional openarrays are not
|
||||
The `openarray` type cannot be nested: multidimensional open arrays are not
|
||||
supported because this is seldom needed and cannot be done efficiently.
|
||||
|
||||
```nim
|
||||
|
|
@ -1549,7 +1549,7 @@ Varargs
|
|||
-------
|
||||
|
||||
A `varargs` parameter is an open array parameter that additionally
|
||||
allows to pass a variable number of arguments to a procedure. The compiler
|
||||
allows a variable number of arguments to be passed to a procedure. The compiler
|
||||
converts the list of arguments to an array implicitly:
|
||||
|
||||
```nim
|
||||
|
|
@ -1563,7 +1563,7 @@ converts the list of arguments to an array implicitly:
|
|||
myWriteln(stdout, ["abc", "def", "xyz"])
|
||||
```
|
||||
|
||||
This transformation is only done if the varargs parameter is the
|
||||
This transformation is only done if the `varargs` parameter is the
|
||||
last parameter in the procedure header. It is also possible to perform
|
||||
type conversions in this context:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue