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.
r must be a nonzero, unsigned, integer constant.
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.
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:
Each ai is any ASCII character.
n is a nonzero, unsigned integer constant.
k is an optionally signed integer constant.
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
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.