HP Fortran Programmer's Guide (B3908-90031; September 2011)

Controlling data storage
Modules vs. common blocks
Chapter 3118
Another feature of the module is that it can include procedures. This feature provides a way to package data
with the procedures needed to operate on the data. A program unit accesses module procedures in the same
way it does module data, with the USE statement. The interface of module procedures is available to the
compiler, which can perform compile-time checks on the actual arguments that are passed to a module
procedure.
Although the module does not completely replace the common block (see, for example, “Sharing data
among programs” on page 113), it does provide a safer and more flexible alternative to the more common
uses—and abuses—of the common block.
For an example of a program that uses the module to share data, see “Compiling programs with modules” on
page 83. The HP Fortran Programmer's Reference provides detailed information about the module program
unit and the MODULE and USE statements.