- Up - | Next >> |
An array is created using NewArray
:
declare A={NewArray LowIndex HighIndex InitValue}
where indices will range from LowIndex
to HighIndex
inclusive, and the initial value of each cell is InitValue
. You can look up the value contained in the cell at position I
as follows:
A.I
where I
is an index between LowIndex
and HighIndex
inclusive. Note that this is the same notation as feature access. Alternatively you can use procedure Get
. The value contained in said cell can be changed to foo
using:
A.I := foo
Note that this combines the dot notation with the new operator :=
. Alternatively you can use procedure Put
.
- Up - | Next >> |