Input/Output

FORTRAN-SO

If 'OLD' or 'NEW' is specified, the FILE specifier must be present also. An 'OLD' file must exist already; a 'NEW' file cannot exist already.

The 'SCRATCH' option must not be specified with a named file. When it is specified with an unnamed file, the file is connected to the specified unit for the duration of program execution or until a CLOSE statement is issued for the same unit.

If 'UNKNOWN' is specified, the file status is processor dependent.

Example:

OPEN (3, FllE= 'MYPROG.SRC',STATUS = 'NEW')

6.2.1.6 Access Method Specifier

The format of the access method specifier is

ACCESS = ace

where 'acc' is a character expression evaulating to 'SEQUENTIAL' or 'DIRECT' (see section 6.1.2.5). If the ACCESS specifier is omitted, the default is 'SEQUEN- TIAL'.

If the file already exists, the specified access method must be allowable for that file. For a new file, the processor creates the file with the specified access method. If the access method is 'DIRECT', the record length specifier (6.2.1.8) must also be pre- sent in 'open-list.'

Example:

OPEN (3, FllE='MYPROG',STATUS='NEW',

&ACCESS = 'SEQUENTIAL')

6.2.1.7 Formatting Specifier

The formatting specifier states whether a file is being connected for formatted or un- formatted input/ output. Its format is

FORM = (mat

where 'fmat' is a character expression evaluating to 'FORMATTED' or 'UN- FORMATTED'. If the FORM specifier is omitted, the default value is 'UN- FORMATTED' when the file is being connected for direct access, and 'FORMAT- TED' when the file is being connected for sequential access.

If the file already exists, the specified formatting must be legal for that file. For a new file, the processor creates the file with the specified formatting.

Example:

OPEN (3, FllE='MYPROG',STATUS='NEW',

&ACCESS = 'SEQUENTIAL',FORM = 'FORMATTED')

6.2.1.8 Record Length Specifier

The record length specifier identifies the length of each record in a file being con- nected for direct access. Its format is

RECl = ree/en

where 'reelen' is a positive integer expression.

6-6

Page 66
Image 66
Intel fortran-80 manual Access Method Specifier, Formatting Specifier, Record Length Specifier, Access = Sequential