# A.2 Obsolescent Language Features in Fortran 95

Some language features considered redundant in Fortran 90 are identified as obsolescent in Fortran 95.

Other methods are suggested to achieve the functionality of the following obsolescent features:

- Alternate returns

  To replace this functionality, it is recommended that you use an integer variable to return a value to the calling program, and let the calling program use a CASE construct to test the value and perform operations (see Section 7.3).

- Arithmetic IF

  To replace this functionality, it is recommended that you use an IF statement or construct (see Section 7.7).

- Assumed-length character functions

  To replace this functionality, it is recommended that you use one of the following:

  - An automatic character-length function, where the length of the function result is declared in a specification expression
  - A subroutine whose arguments correspond to the function result and the function arguments

  Dummy arguments of a function can still have assumed character length; this feature is not obsolescent.

- CHARACTER*(*) form of CHARACTER declaration

  To replace this functionality, it is recommended that you use the Fortran 90 forms of specifying a length selector in CHARACTER declarations (see Section 5.1.2).

- Computed GO TO statement

  To replace this functionality, it is recommended that you use a CASE construct (see Section 7.3).

- DATA statements among executable statements

  This functionality has been included since FORTRAN 66, but is considered to be a potential source of errors.

- Fixed source form

  Newer methods of entering data have made this source form obsolescent and error-prone.

  The recommended method for coding is to use free source form (see Section 2.3.1).

- Shared DO termination and termination on a statement other than END DO or CONTINUE

  To replace this functionality, it is recommended that you use an END DO statement (see Section 7.5.1) or a CONTINUE statement (see Section 7.4).

- Statement functions

  To replace this functionality, it is recommended that you use an internal function (see Section 8.7).

Previous Page Next Page Table of Contents