Next: Procedures
Up: Program Structure and Layout
Previous: Statement Labels
A complete executable program consists of one or more program
units. There is always one (and only one) main program unit: this
starts with a PROGRAM statement. There may also be any
number of subprogram units of any of the three varieties:
- subroutine subprograms: these start with a
SUBROUTINE statement
- function subprograms, also known as external functions:
these start with a FUNCTION statement
- block data subprograms: these start with a BLOCK
DATA statement.
Subroutines and external functions are known collectively as
external procedures; block data subprograms are not procedures
and are used only for the special purpose of initialising the
contents of named common blocks.
Every program unit must end with an END statement.
Helen Rowlands
8/27/1998