next up previous contents
Next: Memory Storage Up: Arrays Previous: Arrays   Contents

Declaring Arrays

Arrays are collections of same-type elements; individual elements are accessed by subscripting the array.

Consider A be a vector of 6 elements,


and B be a matrix,


Suppose each element , is exactly represantable in floating point (i.e. , are REAL numbers). Instead of working with 6+6=12 different REAL variables, we can treat A and B in their entirety as F90 variables; the following are valid F90 declarations:

real, dimension(6)   :: a
real, dimension(2,3) :: b
real :: a(6), b(2,3)   ! shorthand form



Adrian Sandu 2001-08-26