next up previous

1 Overview of Fortran 90     continued...

Numeric Processing
This will be discussed in detail in section 3. The main features in this category are the numeric representation model, many intrinsic functions that return useful model values, the numeric kind system, intrinsic functions that return kind values, and generic operations.

Array Processing
This will be discussed in detail in section 4. Array operations are one of the most significant aspects of Fortran 90.

Pointers provide two important capabilities in Fortran 90- dynamic data structures and dynamic arrays. The latter is especially important for computational science because it allows arrays to be dynamically allocated (and reallocated) of the proper size and provides a means to minimize data transfers when performing operations on variable array sections.

Because of the adverse impact that pointers have on optimization, a Fortran 90 pointer may point only to (a) a data object explicitly declared as a pointer target, (b) a dynamically created object, or (c) another pointer. This makes it possible for static storage optimization technology to be be applied to data that has neither the pointer nor target attributes.

Such pointers may be used for arrays whose sizes are determined at run time, such as dynamically allocated arrays; such arrays are declared as ``deferred shape" arrays, in which the rank is specified, and thereby fixed, but the extent in each dimension is unspecified and dynamic. These dimensions will be dynamically established later. The following examples illustrate such dynamic behavior. (The ``=>" is the Fortran 90 syntax for pointer assignment, and the ALLOCATE statement is used for dynamic allocation of storage.)

REAL, TARGET  :: B(100,100)          ! Array B has the target attribute.
REAL, POINTER :: U(:,:),V(:),W(:,:)  ! Declaration of 3 pointer arrays
U => B(I:I+2,J:J+2)                  ! U points to a 3x3 section of B.
ALLOCATE ( W(M,N) )                  ! Dynamically allocate W, size MxN
V => B(:,J)                          ! V points to the Jth column of B.
V => W(I-1,1:N:2)                    ! V changed to point to (part of) 
                                     !     the I-1st row of W.