I [w [ . m ] ]
The I w and I w.m edit specifiers indicate that the field to be edited occupies w positions. The specified input/output list item must be of type integer. On input, the specified list item becomes defined with an integer datum. On output, the specified list item must be defined as an integer datum.
On input, an I w.m edit specifier is treated identically to an I w edit specifier.
The output field for the I w edit specifier consists of:
Zero or more leading blanks followed by
Either a minus if the value is negative, or an optional plus, followed by
The magnitude of the value in the form on an unsigned integer constant without leading zeros
An integer constant always has at least one digit.
The output field for the I w.m edit specifier is the same as for the I w edit specifier, except that the unsigned integer constant consists of at least m digits, and, if necessary, has leading zeros. The value of m must not exceed the value of w. If m is zero, and the value of the item is zero, the output field consists of only blank characters, regardless of the sign control in effect.
CHARACTER LINE*8 / '12345678' / READ( LINE, '(I2, I3, I2 )') I, J, K PRINT *, I, J, K END
12 345 67
N = 1234 PRINT 1, N, N, N, N 1 FORMAT( I6 / I4 / I2 / I6.5 ) END
1234 1234 ** 01234