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.
INPUT AND OUTPUT<br />
• <strong>PASCAL</strong> input and output procedures<br />
• Terminal 1/0<br />
The input and output procedures are presente~<br />
in alphabetical order.<br />
7.1 FILE CHARACTERISTICS<br />
This section describes the organization of records and methods of<br />
accessing records.<br />
The term file organization app] ies to the way records are physically<br />
arranged on a storage device. The term record cccess refers to the<br />
method used to read records from or write records to a file,<br />
regardless of the file's organization. A file's organization is<br />
specified when the file is created and cannot be changed. Record<br />
access is specified each time the file is opened and can vary.<br />
7.1.1 File Names<br />
The file name indicates the system name of a file that is represented<br />
by a <strong>PASCAL</strong> file variable in an OPEN procedure (Section 7.7). For the<br />
file name, you can specify a character-string expression that contains<br />
a <strong>TOPS</strong>-<strong>20</strong> file specification or a logical name. Apostrophes are<br />
required to delimit a character-string constant or a logical name used<br />
as a file name.<br />
7.1.2 Logical Names<br />
The <strong>TOPS</strong>-<strong>20</strong> operating system provides the logical name mechanism as a<br />
way of making programs device and file independent. If you use<br />
logical names, your <strong>PASCAL</strong> program need not specify the particular<br />
device on which a file resides or the particular file that contains<br />
data. Specific devices and files can be defined at run time.<br />
A logical name is an alphanumeric string that you specify in place of<br />
a file specification. Logical names provide great flexibility because<br />
they can be associated not only with. a complete file specification,<br />
but also with a device, a device and a directory, or even another<br />
logical name.<br />
On <strong>TOPS</strong>-<strong>20</strong> you can create a logical name and associate it with a file<br />
specification by means of the <strong>TOPS</strong>-<strong>20</strong> DEFINE command. Thus, before<br />
program execution, you can associate the logical names in your program<br />
with the file specifications appropriate to your needs, for example:<br />
@DEFINE DATA:<br />
PS: