Technical data

Run-Time Considerations
21
Preconnected Files
Table 1-7 shows the standard preconnected les at program start.
All other units are also preconnected when execution begins. Unit n is
connected to a le named fort.n. These les need not exist, nor will they be
created unless their units are used without rst executing an open. The
default connection is for sequentially formatted I/O.
File Positions
The Fortran 77 standard does not specify where OPEN should initially
position a le explicitly opened for sequential I/O. The I/O system positions
the le to start of le for both input and output. The execution of an OPEN
statement followed by a WRITE on an existing le causes the le to be
overwritten, erasing any data in the le. In a program called from a parent
process, units 0, 5, and 6 are positioned by the parent process.
Unknown File Status
When the parameter STATUS="UNKNOWN" is specied in an OPEN
statement, the following occurs:
If the le does not already exist, it is created and positioned at start of
le.
If the le exists, it is opened and positioned at the beginning of the le.
Table 1-7 Preconnected Files
Unit # Unit
5 Standard input
6 Standard output
0 Standard error