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 />

Example:<br />

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

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

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

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

Z are written to the file connected to unit 8 in their binary form (a form quite incomprehensible to most<br />

human beings). An advantage to using this particular form of the WRITE statement is that no conversion is<br />

required between the internal binary representation of the values and their textual (human-readable) form<br />

(which means it takes less computer time to process the data).<br />

Notes:<br />

1. If no output list is specified then the effect of the WRITE statement is to produce a record whose<br />

characters are all blanks.<br />

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

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

the output 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 entitled "Format" on page 225.<br />

149

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

Saved successfully!

Ooh no, something went wrong!