FORTRAN Reference Manual
Statements
FORTRAN Reference Manual—528615-001
7-88
PROGRAM Statement
Examples
PRINT *, 'Balance Due :$', balance
PRINT 200, base squared, base cubed
PROGRAM Statement
The PROGRAM statement assigns a symbolic name to the main program unit.
prog-name
is a valid symbolic name
Considerations
•
The PROGRAM statement is optional. If you use it, it must be the first statement of 
the main program unit.
•
prog-name is global to the executable program and must be different from the 
name of every external procedure, block data subprogram, or common block in the 
same executable program. prog-name must not be the same as any local name 
in the main program.
Example
The following statement assigns the name PRIMES to the main program unit.
PROGRAM primes
READ Statement
The READ statement inputs data from a specified unit or file.
format
is either the label of a FORMAT statement in the same program unit, the name of 
an integer variable in which the ASSIGN statement has stored the label of a 
FORMAT statement, the name of a character array that contains a format 
specification, a character expression that yields a format specification, or an 
asterisk indicating list directed formatting.
PROGRAM prog-name
READ 
format  , input list–[]
read spec  , read spec–[]. . . –()  input list–[]










