TOPS-20 PASCAL Language Manual - Bitsavers
TOPS-20 PASCAL Language Manual - Bitsavers
TOPS-20 PASCAL Language Manual - Bitsavers
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
PROGRAM HEADING AND DECL~RATION<br />
SECTION<br />
4.1 THE PROGRAM HEADING<br />
The program heading begins the <strong>PASCAL</strong> program. It gives the program a<br />
name and lists the external file variables the program uses.<br />
Format<br />
[fOVERLAID1] PROGRAM program name [(filename [,filename••• ] )]<br />
where:<br />
[OVERLAIDl<br />
specifies that<br />
variables with<br />
Section G.8.<br />
the program can share global<br />
separately compiled modules. See<br />
program name<br />
specifies the name of the program;<br />
six characters are significant.<br />
only the first<br />
filename<br />
specifies the identifier associated<br />
external fiJe that the program uses.<br />
with<br />
an<br />
The program name appears only in the heading and has no other purpose<br />
within the program. The program name cannot be redefined at program<br />
level.<br />
The file names listed in the program heading correspond to the<br />
external files that the program uses. The heading must include the<br />
names of all the external file variables. The predeclared text file<br />
variables INPUT and OUTPUT, by default, refer to your terminal (in<br />
interactive mode) or the batch input and log files (in batch mode).<br />
You must declare file variables for all other external files in the<br />
main program declaration section, and specify those variables in the<br />
program heading. Refer to Chapter 7 for more information on files.<br />
Example I<br />
PROGRAM Test1;<br />
The program heading names the program Testl, but omits the file<br />
variable list. This program does not use the terminal or any external<br />
file.<br />
Example 2<br />
PROGRAM Sauares (INPUT, OUTPUT);<br />
The program heading names the program Squares and specifies the<br />
predeclared file variables INPUT and OUTPUT.<br />
Example 3<br />
PROGRAM Pa~roll (EmploYee, Salar~, Output);<br />
The program heading names the program Payroll and specifies the<br />
external file variables Employee, Salary, and Output.<br />
4-2