Intel fortran-80 Laptop User Manual


 
Input/Output
6-4
6.2 File-Handling Statements
6.2.1 OPEN Statement
The
OPEN
statement can be used to connect
an
existing file to a unit, create a
preconnected file, create a file
and
connect it
to
a unit,
or
change certain specifiers in
the
file/unit
connection.
The
format
of
the
OPEN
statement
is
OPEN (open-list)
where 'open-list'
is
a list
of
specifiers separated by commas.
The
list
of
specifiers is:
[UNIT
=]
unit
IOSTAT =
stname
ERR =
st/
FilE
= fname
STATUS =
stat
ACCESS = aee
FORM =
fmat
RECl
= ree/en
BLANK
=
b/nk
CARRIAGE::::;
car
U nit specifier
II
0 status speci fier
Error
specifier
File
name
specifier
File status specifier
Access
method
specifier
Formatting
specifier
Record length specifier
Blank specifier
Carriage
control specifier
The unit specifier
'unit'
must be present
and
the unit specified
must
exist. All
other
specifiers are
optional
except
that
the record length
(REeL)
must
be specified
if
the
file
is
being connected for direct access. Some specifiers have default values.
The following sections 6.2.1.1 through 6.2.1.10 describe each
of
the 'open-list'
specifiers in detail.
6.2.1.1
Unit
Specifier
The
format
of
the unit specifier
is
[UNIT
=]
unit
where
'unit'
identifies
an
external unit.
If
the
optional
'UNIT
='
is
omitted, the unit
specifier must be the first item in
'open-list.'
An external unit identifier
must
be
an
integer expression whose value
is
in the range
0:$unit:$255.
Examples:
OPEN
(UNIT=3)
OPEN
(4)
6.2.1.2
1/0
Status
Specifier
The
format
of
the
input/
output
status specifier
is
IOSTAT =
stname
where
'stname'
is
an
integer variable
or
integer
array
element
name.
FORTRAN-SO