Est. 1991 Intermediate

Fortran 90

The first major modernization of Fortran, introducing free-form source, modules, array syntax, derived types, and dynamic allocation while remaining a strict superset of FORTRAN 77.

Created by ANSI X3J3 and ISO/IEC JTC1/SC22/WG5

Paradigm Imperative, Procedural, Structured, Array-oriented
Typing Static, Strong
First Appeared 1991
Latest Version ISO/IEC 1539:1991 / ANSI X3.198-1992 (superseded by Fortran 95)

Fortran 90 is the first major modernization of the Fortran language, published as ISO/IEC 1539:1991 and later adopted by ANSI as X3.198-1992. Although the informal name “Fortran 90” reflects the year that technical work on the standard was completed, the international standard itself was published in 1991. The revision transformed Fortran from a fixed-form, statement-oriented language descended from punch cards into a structured language with modules, array syntax, dynamic memory allocation, and user-defined types — while still compiling almost every FORTRAN 77 program unchanged.

History & Origins

Work on a successor to FORTRAN 77 began almost as soon as the 1978 standard was published. The ANSI X3J3 committee, joined later by the ISO working group WG5 (ISO/IEC JTC1/SC22/WG5), spent more than a decade developing the new revision under the working name “Fortran 8x.” The schedule slipped repeatedly as the committee debated how aggressively to modernize the language without breaking its enormous installed base.

When technical work was finally completed in 1990, the language was renamed “Fortran 90” — echoing the earlier pattern where FORTRAN 77 took its informal name from the year of its draft. The international standard appeared as ISO/IEC 1539:1991 in 1991, and ANSI followed with X3.198-1992 in 1992. From this revision onward, the casing convention also changed: the all-caps FORTRAN of earlier standards gave way to the mixed-case Fortran, reflecting the language’s shift toward modern conventions.

What Fortran 90 Added

Fortran 90 was the most consequential single revision in the language’s history. Among its additions:

Free-Form Source

Fortran 90 introduced an alternative free-form source format. Code is no longer constrained to columns 7–72; statements can begin in any column, the exclamation point ! introduces a trailing comment, and the ampersand & is used as a line-continuation character. Fixed-form source remained legal, so FORTRAN 77 code continued to compile.

Modules

Modules replaced the older COMMON block and INCLUDE patterns with a proper namespacing and encapsulation mechanism. A module can group related data, parameters, derived types, and procedures, exposing them via USE statements with optional renaming and selective import.

Array Syntax and Whole-Array Operations

Perhaps the most distinctive Fortran 90 feature is its array language. Whole arrays and array sections can be added, multiplied, and passed to intrinsic functions without explicit loops:

1
2
3
real, dimension(1000) :: a, b, c
c = a + 2.0 * b           ! elementwise across the entire array
where (c > 0.0) c = sqrt(c)

Array sections (a(1:n:2)), masked assignments (where), and a large library of array intrinsics (sum, matmul, dot_product, reshape, transpose, maxval, minloc, etc.) make many numerical algorithms expressible without explicit indexing.

Dynamic Memory: ALLOCATABLE and POINTER

ALLOCATABLE arrays brought standard dynamic memory allocation to Fortran for the first time. POINTER and TARGET attributes added an aliasing mechanism, restricted in ways designed to preserve the optimization opportunities Fortran compilers traditionally exploit.

Derived Types

User-defined types let programmers compose records of heterogeneous data, somewhat analogous to C structs:

1
2
3
4
5
type :: particle
  real :: position(3)
  real :: velocity(3)
  real :: mass
end type particle

Recursion and INTERFACE Blocks

Procedures could now be declared RECURSIVE. Explicit INTERFACE blocks made it possible for compilers to check argument types across separately compiled procedures, and they enabled generic interfaces and operator overloading.

KIND Parameters

The KIND system replaced the older REAL*8, INTEGER*4 extensions with a portable mechanism for selecting numeric precision and integer range:

1
2
integer, parameter :: dp = selected_real_kind(15, 307)
real(kind=dp) :: x

Optional and Keyword Arguments

Procedures could declare arguments as OPTIONAL, and callers could pass arguments by keyword rather than position — a significant improvement in API ergonomics for large libraries.

Anatomy of a Fortran 90 Program

A canonical free-form “Hello, World!” looks like this:

1
2
3
4
program hello
  implicit none
  print *, 'Hello, World!'
end program hello

The conventional file extensions are .f90 and .f95. Compilers such as gfortran, Intel’s ifx/ifort, NAG’s nagfor, and LLVM’s flang use the extension to default to free-form source.

Design Philosophy

Fortran 90’s design followed two simultaneous goals that were often in tension:

  1. Backward compatibility. Virtually every conforming FORTRAN 77 program had to remain a conforming Fortran 90 program. As a result, fixed-form source, arithmetic IF, computed GOTO, COMMON, EQUIVALENCE, and Hollerith data were all retained — though some were marked obsolescent, a label warning programmers that they might be removed in a future revision.

  2. Modernization. The committee deliberately added features drawn from contemporary languages: modules and packaging concepts reminiscent of Ada, array operations influenced by APL and ALGOL 68, and derived types that resembled records in Pascal and structures in C. The result was a language that felt much closer to general-purpose modern programming while keeping its identity as a numerical workhorse.

This dual mandate produced a large language — the standard itself runs to hundreds of pages — and a long compiler-implementation timeline. Full Fortran 90 compilers did not appear from every vendor until well into the mid-1990s.

Evolution

Fortran 90 was directly revised by Fortran 95 (ISO/IEC 1539-1:1997), a minor update that added the FORALL construct, PURE and ELEMENTAL procedures, default initialization for derived-type components, and several features carried back from High Performance Fortran. Later standards — Fortran 2003, 2008, 2018, and 2023 — added object-oriented programming, C interoperability, coarrays for parallelism, submodules, and many smaller improvements, but Fortran 90 remains the conceptual baseline. Most “modern Fortran” tutorials, books, and style guides assume Fortran 90 syntax as the starting point.

Some features marked obsolescent in Fortran 90 were eventually deleted in Fortran 2008 (such as real and double-precision DO control variables and PAUSE), but the language has maintained an exceptionally strong record of backward compatibility: well-written Fortran 90 code from the early 1990s typically still compiles and runs unchanged today.

Current Relevance

Fortran 90 — usually in combination with Fortran 95 and later features — remains a central language of high-performance scientific computing. It is widely used in:

  • Climate, weather, and ocean modelling, where large legacy codebases continue to evolve incrementally on top of Fortran 90 foundations.
  • Computational chemistry and physics, including electronic-structure, molecular-dynamics, lattice-QCD, and plasma-physics codes.
  • Numerical libraries and engineering simulation, where modules, allocatable arrays, and array syntax make modern Fortran competitive with C and C++ for dense numerical work, with Fortran’s stricter aliasing rules reportedly making some array-heavy kernels easier to optimize.

Compiler support is broad and mature: gfortran (part of GCC), Intel’s ifx and ifort, NAG’s nagfor, NVIDIA’s HPC SDK compilers, IBM XL Fortran, and LLVM flang all support Fortran 90 and later. Free-form .f90 source is the default expectation for new Fortran code.

Why It Matters

Fortran 90 is the bridge between Fortran’s punch-card heritage and its place in twenty-first-century scientific computing. Modules, array syntax, and dynamic allocation turned Fortran from a language that programmers tolerated for its performance into one that many actively prefer for numerical work. Almost every feature people now describe as “modern Fortran” — including the object-oriented and parallel features layered on by later standards — sits on the structural foundation Fortran 90 put in place.

For anyone reading or maintaining computational science codebases, Fortran 90 is the dialect to learn: it is recent enough to feel like a structured, modular language, and old enough that an enormous amount of the world’s scientific software is written in it.

Timeline

1978
FORTRAN 77 (ANSI X3.9-1978) is published; ANSI X3J3 immediately begins work on a successor
1980
Work on what was then called 'Fortran 8x' begins in earnest, with goals of modernization while preserving compatibility
1990
Technical work on the new standard is completed; the language is informally named 'Fortran 90' after the target year
1991
ISO/IEC 1539:1991 is published, formally defining Fortran 90 as an international standard
1992
ANSI adopts the standard as ANSI X3.198-1992, aligning with the ISO text
1993
High Performance Fortran (HPF) 1.0 is released, building data-parallel extensions on top of Fortran 90
1997
Fortran 95 (ISO/IEC 1539-1:1997) is published as a minor revision adding FORALL, PURE/ELEMENTAL procedures, and HPF-derived features
2005
GCC 4.0 ships with gfortran, a Fortran 90/95-capable replacement for g77 (development of gfortran had begun a few years earlier as a fork of g95)
2010
Fortran 2008 standardization completes; Fortran 90 remains the baseline that most 'modern Fortran' tutorials assume

Notable Uses & Legacy

Climate and weather models

Large atmospheric and ocean codes such as the Community Earth System Model (CESM), ECMWF's IFS, and the WRF weather model contain extensive Fortran 90/95 code, using modules and array syntax for grid computations.

Computational chemistry packages

Quantum chemistry codes including Gaussian, GAMESS, NWChem, and Quantum ESPRESSO use Fortran 90 modules and derived types to organize complex electronic-structure calculations.

Numerical libraries

Modern numerical libraries such as PETSc and Trilinos expose Fortran 90 module interfaces alongside their C/C++ bindings.

Finite element and CFD codes

Many engineering simulation packages — including portions of NASTRAN derivatives and numerous proprietary CFD and finite-element solvers — were reportedly ported from FORTRAN 77 to Fortran 90 to take advantage of modules and allocatable arrays.

High-performance computing benchmarks

Several SPEC CPU and NAS Parallel Benchmark codes are written in Fortran 90, exercising compilers' ability to optimize array operations and module-based code.

Language Influence

Influenced By

Influenced

Fortran 95 High Performance Fortran (HPF) F (subset language)

Running Today

Run examples using the official Docker image:

docker pull gcc:latest

Example usage:

docker run --rm -v $(pwd):/app -w /app gcc:latest sh -c 'gfortran -std=f95 -o hello hello.f90 && ./hello'
Last updated: