The following Fortran 95 features are new to Fortran:
In Fortran 90, you could build array values element-by-element by using array constructors and the RESHAPE and SPREAD intrinsics. The Fortran 95 FORALL statement and construct offer an alternative method.
FORALL allows array elements, array sections, character substrings, or pointer targets to be explicitly specified as a function of the element subscripts. A FORALL construct allows several array assignments to share the same element subscript control.
FORALL is a generalization of WHERE. They both allow masked array assignment, but FORALL uses element subscripts, while WHERE uses the whole array.
Compaq Fortran previously provided the FORALL statement and construct as language extensions.
Pure user-defined procedures do not have side effects, such as changing the value of a variable in a common block. To specify a pure procedure, use the PURE prefix in the function or subroutine statement. Pure functions are allowed in specification statements.
Compaq Fortran previously provided pure procedures as a language extension.
An elemental user-defined procedure is a restricted form of pure procedure. An elemental procedure can be passed an array, which is acted upon one element at a time. To specify an elemental procedure, use the ELEMENTAL prefix in the function or subroutine statement.
This new intrinsic subroutine returns a processor-dependent approximation of processor time.
In Fortran 90, there was no way to assign a null value to the pointer by using a pointer assignment operation. A Fortran 90 pointer had to be explicitly allocated, nullified, or associated with a target during execution before association status could be determined.
Fortran 95 provides the NULL intrinsic function that can be used to nullify a pointer.
Fortran 95 deletes several language features that were obsolescent in Fortran 90, and identifies new obsolescent features.
Compaq Fortran fully supports features deleted in Fortran 95.