Skip to content
Snippets Groups Projects
Commit 53368e50 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

doc on index operator fixed

Rev: doc/types/array:1.6
parent 29099f89
No related branches found
No related tags found
No related merge requests found
...@@ -11,8 +11,13 @@ DESCRIPTION ...@@ -11,8 +11,13 @@ DESCRIPTION
allocated and does not need to be declared as in C. The values in allocated and does not need to be declared as in C. The values in
the array can be set when creating the array as in the first the array can be set when creating the array as in the first
construction or anytime afterwards like this: arr[index]=data where construction or anytime afterwards like this: arr[index]=data where
index is an integer greater or equal to 0 and smaller than the array index is an integer. Index is normally 0 <= index < sizeof(arr), and
size. Note that arrays are shared and use reference counts to keep refers to the corresponding element in the array. If index is less
than zero, it is the same as doing arr[sizeof(arr)+index]. This
means that negative index will index the array from the end rather
than from the beginning.
Note that arrays are shared and use reference counts to keep
track of their references. This will have the effect that you can track of their references. This will have the effect that you can
have two variables pointing to the same array, and when you change have two variables pointing to the same array, and when you change
an index in in it, both variables will show the change. an index in in it, both variables will show the change.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment