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

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

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

<strong>Language</strong> <strong>Reference</strong><br />

Example:<br />

READ( 8 )X, Y, Z<br />

READ( UNIT=8 )X, Y, Z<br />

The above gives two examples of unformatted READ statements. The unit number used in the example is 8.<br />

When executed, the effect of both of these statements is the same. The values of the variables X, Y and Z<br />

are read from the file connected to unit 8. The values are stored in the file in their binary form (a form<br />

quite incomprehensible to most human beings). An advantage to using this particular form of the READ<br />

statement is that no conversion is required between the internal binary representation of the values and their<br />

textual (human-readable) form (which means it takes less computer time to process the data).<br />

Notes:<br />

1. The REC= specifier may not be used when list-directed output is specified.<br />

2. If no input list is specified then the effect of the READ statement is to skip one or more records in<br />

the file.<br />

3. An implication of point (5) above is that nesting of implied-DO lists is permitted. For example,<br />

the input list<br />

( (A(I,J), B(I,J), J = 1, 5), I = 1, 10 )<br />

may be broken down into the following components:<br />

A(I,J), B(I,J)<br />

(....dlist1...., J = 1, 5)<br />

( .....dlist2..............., I = 1, 10 )<br />

For more information on input/output, see the chapter entitled "Input/Output" on page 215. For more<br />

information on formatted input/output, see the chapter "Format" on page 225.<br />

126 READ Statement

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

Saved successfully!

Ooh no, something went wrong!