Part I: Foundations

"I really didn't know what I was getting into… FORTRAN did more than I ever thought it would." — John Backus, who led the team that created Fortran

Every language has a core you must own before anything else makes sense, and Fortran's core is smaller and more coherent than its reputation suggests. In this first part we go from nothing — no compiler on your machine, no line of Fortran written — to programs that declare typed variables with controlled precision, make decisions, loop, operate on whole arrays at once, call procedures with checked argument intent, and read and write real data files. That is the entire vocabulary of a working Fortran program. Everything in the nine parts that follow is built from it.

We take the foundations slowly and seriously, because the habits you form here — implicit none on every unit, a single controlled precision kind, meaningful names, intent on every argument, arrays thought of as whole objects — are exactly the habits that separate clean modern Fortran from the punch-card caricature. The single most important chapter in the book lives in this part: Chapter 5, on arrays, where you meet the design decision that makes Fortran fast and the memory-layout fact (column-major order) that will echo through every performance chapter later.

What You Will Learn

Chapter 1 — Why Fortran? The case for the whole enterprise: where Fortran runs today, why it persists, and why the "dead language" story is wrong.

Chapter 2 — Setting Up. Install gfortran, compile and run your first program, and understand the compile–link–run cycle and the compiler flags that matter.

Chapter 3 — Variables, Types, and Arithmetic. The intrinsic types, portable precision with kind parameters, and the arithmetic traps (integer division) that catch every newcomer.

Chapter 4 — Control Flow. if, select case, and the family of do loops — plus a first look at array-aware constructs like where and do concurrent.

Chapter 5 — Arrays. Fortran's superpower: whole-array operations, sections, intrinsic array functions, allocatable sizing, and the column-major layout that underlies its speed.

Chapter 6 — Procedures. Subroutines and functions, argument intent, pure/elemental procedures, and assumed-shape array arguments.

Chapter 7 — I/O. Formatted and list-directed output, files, and the namelist input format that scientific codes live on.

How This Part Fits

Part I is the trunk of the book; every other part branches from it. Read it in order — each chapter assumes the one before. When you finish, you will be able to write a complete, correct Fortran program that computes something real, and you will have started the running project (a heat-equation solver) that you carry to the capstone in Chapter 38.

Time Investment

Chapter Title Difficulty Est. hours
1 Why Fortran? Beginner 3
2 Setting Up Beginner 4
3 Variables, Types, and Arithmetic Beginner 5
4 Control Flow Beginner 4
5 Arrays Intermediate 6
6 Procedures Intermediate 5
7 I/O Intermediate 5
Part I total ~32 hours

Turn to Chapter 1: the language that runs the world's supercomputers, and why you should learn it.

Chapters in This Part