Fourteen days of drills that turn Fortran's array rules into things you can prove you know.
This is a drill manual, not a narrative course. The programming problems build one real program across the book: flux, a command-line tool that analyses a numerical grid. It starts as a program that prints its own version. By the close of Chapter 14 it reads a grid from a file, reports row and column statistics, runs a stencil over the interior, times its own passes and reduces in parallel. A reader who works the programming problems finishes with a working tool. A reader who skips them still finishes with the language, because the exposition never depends on flux existing.
The fourteen chapters carry the working core of Fortran for numerical computing. The opening chapters fix the program, the compiler and the kind system, then settle whole-array expressions, sections and reductions as rules with failure examples rather than quirks discovered by accident later. The middle chapters cover do concurrent, the intent attribute, modules and submodules, derived types, and the memory rules that decide when a finalizer actually fires. The later chapters cover input and output driven by iostat, format control, IEEE arithmetic, and memory order and timing measured rather than assumed. The book closes on parallelism.
Every claim in the book was compiled. Integer overflow, a rank error, a hidden array temporary, a finalizer that does not fire, an optimiser that deletes a timed loop whose result nothing reads - each is on the page because a compiler on a real machine did it, with the diagnostic or output it actually produced printed underneath.
Every chapter has the same shape. Numbered sections state the rules, and each rule carries its own worked example: a complete, compilable program, the output captured from its run, and a figure drawing the mechanism. Five problem sets close the chapter: Review Questions, Worked Problems and Worked Programming Problems with full solutions, then unassisted Practice Problems in both forms. Review question answers sit at the end of the chapter. The practice problems have no answers anywhere, by design.
YOUR 14-DAY PATH
- THE PROGRAM AND THE COMPILER
- TYPES, KINDS AND PRECISION
- ARRAYS AND WHOLE-ARRAY EXPRESSIONS
- ARRAY SECTIONS, RESHAPE AND REDUCTIONS
- CONTROL FLOW AND DO CONCURRENT
- PROCEDURES, ARGUMENTS AND INTENT
- MODULES AND SUBMODULES
- DERIVED TYPES AND TYPE-BOUND PROCEDURES
- ALLOCATABLES, POINTERS AND MEMORY
- FILE INPUT AND OUTPUT
- CHARACTER STRINGS AND FORMATTING
- IEEE ARITHMETIC AND NUMERICAL ERROR
- PERFORMANCE: MEMORY ORDER AND TIMING
- PARALLELISM: DO CONCURRENT, COARRAYS AND OPENMP
WHO IT'S FOR
A reader who can already program and wants fluency in Fortran under test conditions. Students on a computational science course. Researchers who have inherited a Fortran code base and need to read and change it with confidence. Programmers who need array computation that runs fast. No prior Fortran is assumed, and no mathematics beyond an average and a straight line.
383 runnable listings. 458 figures. 370 pages. Written to Fortran 2023 as GNU Fortran 15.2.0 implements it, with no external library used anywhere in the book.
Install a current GNU Fortran, open Chapter 1, and start compiling the listings.