24.11.2014 Views

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

Open Watcom FORTRAN 77 Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>FORTRAN</strong> Statements<br />

2.62 OPEN Statement<br />

<br />

OPEN (oplist)<br />

where:<br />

oplist<br />

must include the UNIT= specifier and may include at most one of each of the open<br />

specifiers listed below. Specifiers are separated by commas.<br />

[UNIT =] u<br />

IOSTAT = ios<br />

ERR = s<br />

FILE = fin<br />

STATUS = sta<br />

ACCESS = acc<br />

FORM = fm<br />

RECL = rcl<br />

BLANK = blnk<br />

As an extension to the <strong>FORTRAN</strong> <strong>77</strong> language, the following inquiry specifiers are also<br />

supported.<br />

ACTION = act<br />

CARRIAGECONTROL = cc<br />

RECORDTYPE = rct<br />

BLOCKSIZE = bl<br />

SHARE = shr<br />

The OPEN statement may be used to connect an existing file to a unit, create a file that is preconnected,<br />

create a file and connect it to a unit, or change certain specifications of a connection between a file and a<br />

unit.<br />

<strong>Open</strong> Specifiers<br />

[UNIT =] u<br />

IOSTAT = ios<br />

ERR = s<br />

u is an external unit identifier. An external unit identifier is a non-negative integer<br />

expression. If the optional UNIT= specifier is omitted then the specifier must be the first<br />

item in the list of specifiers.<br />

is an input/output status specifier. The integer variable or integer array element ios is<br />

defined with zero if no error condition exists or a positive integer value if an error condition<br />

exists.<br />

is an error specifier and s is a statement label. When an error occurs, execution is<br />

transferred to the statement labelled by s.<br />

OPEN Statement 111

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!