Documentation

FORTRAN 66 reference

A complete, example-driven reference manual for the FORTRAN 66 language (USA Standard X3.9-1966) plus the DEC FORTRAN-10 extensions, organized on the standard: program form, data types, expressions, statements, procedures, and the intrinsic library, with a forterp notes box per chapter. The strict-subset dialect (forterp.F66).

The FORTRAN 66 reference manual

A complete, example-driven reference for the FORTRAN 66 language — USA Standard X3.9-1966, the original standard FORTRAN — together with the DEC FORTRAN-10 extensions that real PDP-10 code relied on. It is the strict base dialect — the language most 1960s–70s decks were written in; select it with --std f66 or dialect=forterp.F66 (the default is now FORTRAN 77).

This manual is written for people who want to read and write FORTRAN 66 — to bring a vintage deck back to life, to understand what a classic program does, or to write new code in the old style. Every feature is shown with a small, runnable example and its result.

It is self-contained: you do not need to know any other FORTRAN to use it. It runs on forterp; each chapter ends with a forterp notes box describing anything specific to how forterp implements that part of the language (and which knobs change it). For how to select and run a dialect, see the Python API guide and Command-line tools.

FORTRAN 66 or FORTRAN 77? F66 is the older, smaller language. If you are writing new code and want the CHARACTER type, the block IF … THEN … ELSE … END IF, list-directed I/O, and OPEN/CLOSE, you want the FORTRAN 77 reference manual instead. Use this manual for code that predates F77, or that uses the DEC FORTRAN-10 extensions.

How to read this manual

  • Chapters follow the structure of the X3.9-1966 standard section for section, but you can read them in any order — they cross-reference each other.
  • Code is shown in fixed source form (the classic punched-card column layout explained in Chapter 3). FORTRAN 66 has no inline comment character (the ! of later FORTRANs is a FORTRAN-10 extension), so annotations and expected results are shown on C comment lines, conventionally written C -> ....
  • A box marked forterp notes flags behavior particular to forterp — an enforced rule, a supported extension, or a tunable default — including the handful of deliberate divergences forterp keeps for faithfulness to real FORTRAN-10 V5 (collected in Appendix C).
  • Section numbers in parentheses, e.g. (§6.1), point at the standard for authority.

Contents

Preliminaries

  1. Purpose & scope
  2. Basic terminology

Writing a program

  1. Program form
  2. Data types
  3. Data & procedure identification

Computing

  1. Expressions
  2. Statements

Program units

  1. Procedures & subprograms
  2. Programs
  3. Intra- & inter-program relationships

Appendices