Documentation

FORTRAN 77 reference

A complete, example-driven reference manual for the FORTRAN 77 language (ANSI X3.9-1978) — forterp's default dialect — organized on the standard: data types, arrays, expressions, control flow, I/O and FORMAT, procedures, and the intrinsic library, with a forterp notes box per chapter.

The FORTRAN 77 reference manual

A complete, example-driven reference for the FORTRAN 77 language — ANSI X3.9-1978, the full language (not the subset level). It is written for people who want to read and write FORTRAN 77, whether to maintain vintage code or to understand what a classic program does. Every feature is shown with a small, runnable example and its result. It is forterp's default dialect.

This manual is self-contained: you do not need to know an earlier 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 the F77 dialect, see the Python API guide and Command-line tools.

How to read this manual

  • Chapters follow the structure of the standard, but you can read them in any order — they cross-reference each other.
  • Code is shown in fixed source form (the classic column layout explained in Chapter 3). Expected output appears in a trailing comment.
  • A box marked forterp notes flags behavior particular to forterp — an enforced rule, a supported extension, or a tunable default. These never change what a standard-conforming program means; they tell you what to expect at the edges.
  • Section numbers in parentheses, e.g. (§6.1.5), point at the standard for authority.

Contents

The basics

  1. Overview & program structure
  2. Language elements & concepts
  3. Source form
  4. Data types & constants

Building blocks

  1. Arrays & substrings
  2. Expressions & operators
  3. Statements at a glance
  4. Specification statements

Giving values & doing work

  1. The DATA statement
  2. Assignment
  3. Control statements

Input & output

  1. Input / output
  2. FORMAT & edit descriptors

Program units

  1. Main program
  2. Functions & subroutines
  3. Block data

The formal model

  1. Storage association & definition
  2. Scopes & symbolic names

Appendices