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 />
7.7.1 File History -- NEW, OLD, READONLY, or UNKNOWN<br />
The file status indicates whether the specified file exists or must be<br />
created. The possible values are:<br />
NEW<br />
OLD<br />
HEADONLY<br />
UNKNOWN<br />
A file status of NEW indicates that a new file must be created with<br />
the specified attributes. NEW is the default value.<br />
If you specify OLD, the system tries to open an existing file. An<br />
error occurs if the file cannot be found. OLD is invalid for internal<br />
files, which are newly created each time the declaring program or<br />
subprogram is executed.<br />
A file status of READONLY indicates that an existing file is being<br />
opened only for reading. An error occurs if you try to write to a<br />
file that has been opened with READONLY.<br />
If you specify UNKNOWN, the system first tries to open an existing<br />
file. If an existing file cannot be found, a new file is created with<br />
the specified attributes.<br />
If you specify READONLY, the system generates an error if a REWRITE is<br />
performed on the file. READONLY implies OLD.<br />
7.7.2 Record Length<br />
The record length parameter specifies the record length used in the<br />
file. Any positive integer can be used.<br />
7.7.3 Record Access Mode -- SEQUENTIAL or DIRECT<br />
The record access mode specifies the access to the components of the<br />
file. The modes are:<br />
DIRECT<br />
SEQUENTIAL<br />
In SEQUENTIAL mode, you can access files with fixedvariable-length<br />
records. The default access mode is SEQUENTIAL.<br />
or<br />
DIRECT mode allows you to use the FIND procedure to access files with<br />
fixed-length records. You cannot access a file with variable-length<br />
records in DIRECT mode.<br />
7-10