type float = double_real; type One_Dim_R = array [ float ]; type One_Dim_I = array [ integer ]; type Two_Dim_I = array [ One_Dim_I ];The first statement defines a convenient type-name, "

Note that in the array type declarations, no sizes are specified; this is because size and index range are not characteristics of array types, but only of specific values which are instances of array types. Arrays of type `One_Dim_R` can have as many elements as desired in the program; they can also have any index range the programmer finds expedient, as long as the upper index bound is at least as large as the lower bound. The same is true for arrays of type `Two_Dim_I`. Furthermore, the one-dimensional arrays making up the rows of a two-dimensional array can all have different sizes and index ranges, leading to what are called "ragged arrays".

These matters will be made clearer in the examples to follow. For the moment, the key point to focus on is that all values are dynamic and transitory in Sisal programs. If a statement returns, or evaluates to, a value that is a one-dimensional array, that array's size and index range are defined solely by the statement whose value it is; and, the value itself exists only until it is finally consumed by a further statement in the program.

One other matter concerning arrays should be mentioned at this time: indexing and logical structure. We have just seen that a two-dimensional array may be considered an array of one-dimensional arrays. This inductive hierarchical structuring continues into greater numbers of dimensions; for instance, a three-dimensional array is an array of two-dimensional arrays. When indexing an array, the elements accessed get smaller (or simpler) as more indices are specified from left to right. For instance, if we have the type declarations shown above, and array A is of type `Two_Dim_I`, then A[6] is the sixth row of A, and A[4,7] is the seventh element of the fourth row. It is also correct syntax to specify this element as A[4][7], which clarifies thae fact that we are specifying the seventh element of the fourth element of A.

There is no notation in Sisal for specifying a single column of a two-dimensional array, nor is there a correct notation for omitting the left or middle index from an access to a three dimensional array. Indices must be supplied from the left and omitted, if they are not all supplied, from the right.

Similarly, suppose we add the following declaration to the above set:

type Three_Dim_I = array [ Two_Dim_I ];And suppose we have an array B of type