06.03.2014 Views

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Data Transfer I/O Statements 10<br />

I/O Status Specifier<br />

The I/O status specifier designates a variable to store a value indicating the status of a data transfer<br />

operation. It takes the following form:<br />

IOSTAT=i-var<br />

i-var<br />

Is a scalar integer variable. When a data transfer statement is executed, i-var is set to one of the<br />

following values:<br />

A positive integer<br />

A negative integer<br />

Zero<br />

Indicating an error condition occurred.<br />

Indicating an end-of-file or end-of-record condition occurred. The<br />

negative integers differ depending on which condition occurred.<br />

Indicating no error, end-of-file, or end-of-record condition occurred.<br />

Execution continues with the statement following the data transfer statement, or the statement<br />

identified by a branch specifier (if any).<br />

An end-of-file condition occurs only during execution of a sequential READ statement; an<br />

end-of-record condition occurs only during execution of a nonadvancing READ statement.<br />

See Also<br />

Building Applications for details on the error numbers returned by IOSTAT<br />

Branch Specifiers<br />

A branch specifier identifies a branch target statement that receives control if an error, end-of-file,<br />

or end-of-record condition occurs. There are three branch specifiers, taking the following forms:<br />

ERR=label<br />

END=label<br />

EOR=label<br />

label<br />

Is the label of the branch target statement that receives control when the specified condition<br />

occurs.<br />

The branch target statement must be in the same scoping unit as the data transfer statement.<br />

The following rules apply to these specifiers:<br />

• ERR<br />

The error specifier can appear in a sequential access READ or WRITE statement, a<br />

direct-access READ statement, or a REWRITE statement.<br />

10-7

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

Saved successfully!

Ooh no, something went wrong!