FORTRAN 77 Language Reference

Description

The FORMAT statement includes the explicit editing directives to produce or use the layout of the record. It is used with formatted input/output statements and ENCODE/DECODE statements.

Repeat Factor

r must be a nonzero, unsigned, integer constant.

Repeatable Edit Descriptors

The descriptors I, O, Z, F, E, D, G, L, and A indicate the manner of editing and are repeatable.

w and e are nonzero, unsigned integer constants.

d and m are unsigned integer constants.

Nonrepeatable Edit Descriptors

The descriptors are the following:

("), ($), ('), (/), (:), B, BN, BZ, H, P, R, Q, S, SU, SP, SS, T, TL, TR, X

These descriptors indicate the manner of editing and are not repeatable:

Item Separator

Items in the format specification list are separated by commas. A comma can be omitted before or after the slash and colon edit descriptors, between a P edit descriptor, and the immediately following F, E, D, or G edit descriptors.

In some sense, the comma can be omitted anywhere the meaning is clear without it, but, other than those cases listed above, this is nonstandard. u

Variable Format Expressions @

In general, any integer constant in a format can be replaced by an arbitrary expression enclosed in angle brackets:

1 FORMAT( < e > )

The n in an nH... edit descriptor cannot be a variable format expression.