An array contains a set of objects called elements that can be referenced individually according to a rectilinear coordinate system.
An array element is referred to by a (possibly empty) series of indices. The length of the series must equal the rank of the array. Each index must be a non-negative fixnum less than the corresponding array dimension. Array indexing is zero-origin.
An axis of an array is called a dimension.
Each dimension is a non-negative fixnum; if any dimension of an array is zero, the array has no elements. It is permissible for a dimension to be zero, in which case the array has no elements, and any attempt to access an element is an error. However, other properties of the array, such as the dimensions themselves, may be used.
An implementation may impose a limit on dimensions of an array, but there is a minimum requirement on that limit. See the variable array-dimension-limit.
An array can have any number of dimensions (including zero). The number of dimensions is called the rank.
If the rank of an array is zero then the array is said to have
no dimensions, and the product of the dimensions (see array-total-size
)
is then 1; a zero-rank array therefore has a single element.
An array of rank one (i.e., a one-dimensional array) is called a vector.
A fill pointer is a non-negative integer no
larger than the total number of elements in a vector.
Not all vectors have fill pointers.
See the functions make-array and adjust-array
.
An element of a vector is said to be active if it has an index that is greater than or equal to zero, but less than the fill pointer (if any). For an array that has no fill pointer, all elements are considered active.
Only vectors may have fill pointers; multidimensional arrays may not. A multidimensional array that is displaced to a vector that has a fill pointer can be created.
Multidimensional arrays store their components in row-major order; that is, internally a multidimensional array is stored as a one-dimensional array, with the multidimensional index sets ordered lexicographically, last index varying fastest.
An implementation may impose a limit on the rank of an array, but there is a minimum requirement on that limit. See the variable array-rank-limit.