diff options
author | Ico Doornekamp <ico@pruts.nl> | 2020-08-10 14:01:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-10 14:01:47 +0200 |
commit | 2260ede247c50b88677e9f80530469d4d7d0c43a (patch) | |
tree | 67917c650ae88ace8e855b8054a3fd756318e876 /doc | |
parent | e5dbdc1d371101c951dfc8f7671ae795cff652aa (diff) | |
download | Nim-2260ede247c50b88677e9f80530469d4d7d0c43a.tar.gz |
Added array type definition to manual (#15173)
Co-authored-by: Ico Doornekamp <git@zevv.nl>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/manual.rst b/doc/manual.rst index c5608da84..4d26421fe 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -1301,6 +1301,9 @@ array constructor ``[]``. The element type of this array expression is inferred from the type of the first element. All other elements need to be implicitly convertible to this type. +An array type can be defined using the `array[size, T]` syntax, or using +`array[lo..hi, T]` for arrays that start at an index other than zero. + Sequences are similar to arrays but of dynamic length which may change during runtime (like strings). Sequences are implemented as growable arrays, allocating pieces of memory as items are added. A sequence ``S`` is always |