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>FORTRAN</strong> Statements<br />

2.85 WRITE Statement<br />

<br />

WRITE (cilist) [olist]<br />

where:<br />

cilist<br />

is a control information list of specifiers separated by commas:<br />

[UNIT =] u<br />

[FMT =] f<br />

REC = rn<br />

IOSTAT = ios<br />

ERR = s<br />

olist<br />

is an output list.<br />

The WRITE statement is used to transfer data from the executing <strong>FORTRAN</strong> program to an external device<br />

or file.<br />

Control Information List<br />

[UNIT =] u<br />

u is an external unit identifier or an internal file identifier.<br />

1. An external unit identifier is a non-negative integer expression or an asterisk<br />

(*) in which case unit 6 is assumed.<br />

2. An internal file identifier is the name of a character variable, character array,<br />

character array element, or character substring.<br />

If the optional UNIT= specifier is omitted then the unit specifier must be the first item in<br />

the list of specifiers.<br />

[FMT =] f<br />

f is a format identifier. A format identifier is one of the following:<br />

1. A statement label of a FORMAT statement that appears in the same program unit<br />

as the format identifier.<br />

2. An integer variable name that has been assigned the statement label of a<br />

FORMAT statement that appears in the same program unit as the format identifier<br />

(see the ASSIGN statement).<br />

3. An integer array name.<br />

4. A character array name.<br />

5. Any character expression except one involving the concatenation of an operand<br />

whose length specification is (*) unless the operand is a symbolic constant (see<br />

the PARAMETER statement).<br />

6. An asterisk (*), indicating list-directed formatting.<br />

7. A NAMELIST name, indicating namelist-directed formatting.<br />

If the optional FMT= specifier is omitted then the format specifier must be the second item<br />

in the list of specifiers and UNIT= must not be specified for the first item in the list.<br />

WRITE Statement 147

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

Saved successfully!

Ooh no, something went wrong!