VMS Help PASCAL, Compilation Units, PROGRAM *Conan The Librarian (sorry for the slow response - running on an old VAX) |
A program is a set of instructions that can be compiled and executed by itself. Syntax: [[attribute-list]] PROGRAM comp-unit-identifier [[({file-identifier},...)]]; [[declaration-section]] BEGIN {statement};... END. The 'attribute-list' is one or more identifiers that provide additional information about the compilation unit. The 'comp-unit-identifier' specifies the name of the program. The identifier appears only in the heading and has no other purpose within the compilation unit. The 'file-identifier' specifies the names of any file variables associated with the external files used by the compilation unit. The 'declaration-section' is a Compaq Pascal declaration section. The 'statement' is any Compaq Pascal statement. The program heading includes all information preceding the program block. If your program contains any input or output routines, you must list all the external file variables that you are using in the compilation unit's heading. File variables listed in a heading must also be declared locally in the block, except for the predeclared file variables INPUT, OUTPUT, or ERR. The INPUT identifier corresponds to a predefined external file that accepts input from the default device (usually, your terminal); the OUTPUT identifier corresponds to a predefined external file that sends output to the default device (usually, your terminal); the ERR identifier corresponds to a predefined external file that sends error messages to the default device (usually your terminal). If you redeclare INPUT, OUTPUT, or ERR in a nested block, you lose access to the default input, output, and error devices.
|