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.

Format<br />

Omitting the asterisk and format specification also indicates list-directed formatting.<br />

Example:<br />

READ, X, Y, Z<br />

PRINT, X, Y, Z<br />

Records used during list-directed formatting are called list-directed records. A list-directed record is a<br />

sequence of values and value separators. Any sequence of blanks is treated as a single blank except when it<br />

appears in a character constant. The end of a record has the same effect as a blank character.<br />

A value is one of the following:<br />

where:<br />

1. A constant.<br />

2. A null value.<br />

3. r*c<br />

4. r*<br />

r<br />

c<br />

is an unsigned, nonzero integer constant.<br />

is a constant.<br />

The r*c form is equivalent to r successive occurrences of c. The r* form is equivalent to r successive<br />

occurrences of the null value. In these two forms, blanks are permitted only where they are allowed in the<br />

constant c.<br />

A value separator is one of the following:<br />

1. A comma preceded and followed by any number of blanks.<br />

2. A slash preceded and followed by any number of blanks. A slash as a value separator terminates<br />

the execution of the input statement. The definition status of the remaining input items in the<br />

input list remains the same as it was prior to the input statement.<br />

3. Any number of blanks between two values.<br />

A null value is specified by having no character between successive value separators, no characters<br />

preceding the first value separator in a record or the r* form. It has no effect on the current value of the<br />

input item. Note that the end of record following a value separator does not specify a null value.<br />

11.9.1 List-Directed Input<br />

The input forms acceptable to format specifications for a given type are also acceptable for list-directed<br />

formatting with certain exceptions.<br />

1. Blanks are never used as zeroes and blanks embedded in constants are not allowed except in<br />

character constants.<br />

2. An input item of type real or double precision must have an input field suitable for F editing<br />

except that no fractional digits are assumed unless a decimal point is present in the field. Such a<br />

field will be called a numeric input field.<br />

List-Directed Formatting 239

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

Saved successfully!

Ooh no, something went wrong!