Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Fortran Compiler for HP-UX: HP Fortran Programmer's Reference > Chapter 10 HP Fortran statements

PROGRAM

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

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”.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.