Est. 1978 Intermediate

FORTRAN 77

The 1978 ANSI standard for Fortran that introduced structured programming features, the CHARACTER data type, and the file I/O model still recognizable in modern Fortran.

Created by ANSI X3J3 Committee

Paradigm Imperative, Procedural, Structured
Typing Static, Strong
First Appeared 1978
Latest Version ANSI X3.9-1978 / ISO 1539:1980 (superseded by Fortran 90)

FORTRAN 77 is the 1978 ANSI standard revision of Fortran, formally designated ANSI X3.9-1978 and later adopted internationally as ISO 1539:1980. Although it carries “77” in its name — reflecting the year the draft was approved — the published standard appeared in April 1978. For more than a decade it was the dominant language of scientific and engineering computation, and its dialect remains the lingua franca of an enormous body of still-running numerical code.

History & Origins

By the late 1960s, FORTRAN 66 had standardized the language across vendors, but it lacked many features that programmers had come to expect from contemporaries like ALGOL 60 and PL/I. The ANSI X3J3 committee set out to modernize the language while preserving its enormous installed base.

The result, approved in 1977 and published the following year, was a careful balance: FORTRAN 77 retained the fixed-form source layout, six-character identifier limit (officially), and the overall punch-card heritage of FORTRAN 66, but it introduced features that brought it much closer to the structured programming style of the 1970s.

The Name “77”

Drafts and committee documents referred to the new standard by its expected approval year. When the document slipped into 1978 for formal publication, the “77” had already stuck — and so the language is universally known as FORTRAN 77 even though its standard number is X3.9-1978.

What FORTRAN 77 Added

Compared with FORTRAN 66, the 1978 standard introduced a substantial list of features that are now taken for granted:

Structured Control Flow

The block IF construct (IF ... THEN ... ELSE IF ... ELSE ... END IF) finally gave Fortran a structured conditional, reducing reliance on arithmetic IF statements and computed GOTOs.

The CHARACTER Data Type

Before FORTRAN 77, character data was awkwardly packed into integer or Hollerith variables. The new CHARACTER type, with declared lengths and a small set of intrinsic operations (substring, concatenation, lexical comparison via LGE, LGT, LLE, LLT), made text processing tractable for the first time in standard Fortran.

Modern File I/O

OPEN, CLOSE, and INQUIRE statements introduced a uniform model for connecting external files to logical unit numbers. List-directed I/O (READ *, ... / WRITE(*,*) ...) made simple input and output far less ceremonial.

PARAMETER, SAVE, and IMPLICIT

  • PARAMETER introduced named constants.
  • SAVE made the lifetime of local variables explicit between calls.
  • IMPLICIT (and IMPLICIT NONE, widely supported as an extension and standardized later) let programmers control or disable Fortran’s implicit I-N integer typing rule.

Generic Intrinsic Functions

Intrinsic functions like SQRT, LOG, and ABS became generic, dispatching on argument type rather than requiring DSQRT, CSQRT, and so on — though the type-specific names remained available.

Anatomy of a FORTRAN 77 Program

FORTRAN 77 is a fixed-form language. Each source line is divided into columns with specific meanings:

ColumnsPurpose
1C or * in column 1 marks a comment line
1–5Statement label (numeric)
6Continuation character (any non-blank, non-zero)
7–72Statement body
73–80Ignored (historically for card sequence numbers)

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

1
2
3
      PROGRAM HELLO
      WRITE(*,*) 'Hello, World!'
      END

The leading six spaces are not decoration — they are required by the column rules. Modern compilers like gfortran accept this source when invoked with -std=legacy or when the file is named with a .f or .for extension.

Design Philosophy

FORTRAN 77 was a conservative standard. The committee deliberately avoided breaking the vast investment in FORTRAN 66 code and skills: the new features were almost entirely additive, and most FORTRAN 66 programs compiled unchanged. This conservatism is the main reason FORTRAN 77 became so durable — institutions could adopt it incrementally without rewriting their libraries.

The flip side was that FORTRAN 77 inherited limitations that would not be addressed until Fortran 90:

  • No dynamic memory allocation (no ALLOCATABLE arrays)
  • No recursion in the standard (though many compilers permitted it as an extension)
  • No modules; only COMMON blocks for shared data
  • No derived types or pointers
  • A six-character identifier limit in the standard (commonly relaxed in practice)

Evolution and Legacy

Fortran 90, published in 1991 as ISO/IEC 1539:1991, was a far more ambitious revision: free-form source, modules, array syntax, dynamic allocation, derived types, and recursion. It nonetheless preserved FORTRAN 77 as a strict subset, so legacy code continued to compile.

Subsequent standards — Fortran 95, 2003, 2008, 2018, and 2023 — have continued that tradition of backward compatibility. As a result, FORTRAN 77 source files written in the 1980s typically still compile and run today with modern toolchains such as gfortran, Intel’s ifx, NAG’s nagfor, and LLVM flang. Some obsolescent features (arithmetic IF, computed GOTO, fixed-form source itself) are flagged or require legacy modes, but they are not removed.

Current Relevance

FORTRAN 77 is no longer the language of choice for new projects, but its code is everywhere that numerical computing matters:

  • LAPACK and the BLAS reference implementations originated in FORTRAN 77 and remain widely distributed in that form. High-performance vendor BLAS libraries (Intel MKL, OpenBLAS, BLIS) implement the same interfaces.
  • NetLib hosts hundreds of FORTRAN 77 numerical packages (MINPACK, QUADPACK, FFTPACK, ODEPACK, SLATEC, EISPACK) that are still wrapped and called by modern scientific Python, R, and Julia code.
  • Large climate, weather, and engineering codes contain substantial FORTRAN 77 subroutines, often interoperating with newer Fortran or C++ via wrapper layers.

Calling FORTRAN 77 from Python through SciPy, or from C via f2c and modern Fortran’s C interoperability, remains a common pattern in computational science.

Why It Matters

FORTRAN 77 is the standard that carried Fortran from its punch-card origins into the era of structured programming and made it the workhorse of computational science for the 1980s and much of the 1990s. Its careful conservatism — adding what was needed without breaking what existed — is the reason that code written for a VAX in 1985 can still be compiled and run, almost without modification, on a Linux laptop in 2026.

For anyone working with scientific libraries, legacy engineering code, or the deep history of high-performance computing, reading FORTRAN 77 is a basic literacy skill. It is the dialect in which an extraordinary amount of the world’s numerical infrastructure was written.

Timeline

1966
FORTRAN 66 (ANSI X3.9-1966) published as the first standardized Fortran
1969
ANSI X3J3 committee begins work on a successor standard
1977
Draft standard approved by X3J3; the informal name 'FORTRAN 77' is adopted
1978
ANSI X3.9-1978 formally published in April, defining FORTRAN 77
1980
ISO adopts the standard as ISO 1539:1980, giving FORTRAN 77 an international standard
1991
Fortran 90 (ANSI X3.198-1992 / ISO/IEC 1539:1991) supersedes FORTRAN 77 with free-form source, modules, and array syntax
1995
Reaffirmation work and corrigenda continue while FORTRAN 77 remains dominant in scientific computing through the mid-1990s
2018
GCC's gfortran continues to compile FORTRAN 77 source via the -std=legacy flag, keeping legacy code buildable on modern systems

Notable Uses & Legacy

LAPACK and LINPACK

The foundational dense linear algebra libraries used across scientific computing were originally written in FORTRAN 77; LAPACK's reference implementation remained Fortran 77 source for decades and is still widely distributed.

NetLib scientific libraries

The NetLib repository hosts a large collection of FORTRAN 77 numerical routines (BLAS, EISPACK, MINPACK, QUADPACK, FFTPACK) that remain in active use, often wrapped by higher-level languages like Python via SciPy.

NCAR Community Climate Model

Early generations of the NCAR Community Climate Model and related atmospheric codes were written in FORTRAN 77, and substantial portions of that code lineage remain embedded in current climate models.

Legacy engineering codes

Finite element analysis, computational fluid dynamics, and reservoir simulation codes from the 1980s and 1990s — many still in production at engineering firms — are predominantly FORTRAN 77.

SciPy numerical backends

Several routines exposed through SciPy (e.g., parts of scipy.optimize, scipy.integrate, scipy.special) wrap NetLib FORTRAN 77 code, compiled at install time.

Language Influence

Influenced By

FORTRAN 66 ALGOL 60 PL/I

Influenced

Fortran 90 HPF (High Performance Fortran) 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=legacy -o hello hello.f && ./hello'
Last updated: