LF Fortran 95


An array is a set of data, all of the same type and type parameters, arranged in a rectangular pattern of one or more dimensions. A data object that is not an array is a scalar. Arrays can be specified by using the DIMENSION statement or by using the DIMENSION attribute in a type declaration statement. An array has a rank that is equal to the number of dimensions in the array; a scalar has rank zero. The array's shape is its extent in each dimension. The array's size is the number of elements in the array. In the following example

integer, dimension (3,2) :: i

i has rank 2, shape (3,2), and size 6.

Subtopics in the following sections describe these topics: