HP Fortran Programmer's Reference (September 2007)

HP Fortran statements
PROGRAM
Chapter 10436
PROGRAM
Identifies the main program unit.
Syntax
PROGRAM
name
name
is the name of the program.
Description
The optional PROGRAM statement assigns a name to the main program unit.
name
does not
have to match the main program’s filename. However, if the corresponding END PROGRAM
statement specifies a name, it must match
name
.
If the PROGRAM statement is specified, it must be the first statement in the main program unit.
Examples
! A program with a name
PROGRAM main_program
PRINT *, 'This program doesn't do much.'
END PROGRAM main_program
Related statements
END
Related concepts
For information about the main program unit, see “Main program” on page 158.