7.8.1 Library Style

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.:= foo

Note that this combines the dot notation with the new operator :=. Alternatively you can use procedure Put.


Denys Duchier, Claire Gardent and Joachim Niehren
Version 1.3.99 (20050412)