Conversion of numbers from internal to external representation and vice versa.
print fmt, list
Quantities to be read or written: variables for input, expressions for output.
List directed I/O
Format is defined by the computer at the moment the statement is executed.
print *, "Fahrenheit temperature", tf, "F"
print "(f3.1, tr2, f9.4)", u, p
It is possible to program formats in a flexible way using character arrays, character expressions, substrings, etc. This allows to build up a format dynamically at execution-time from various components.
print 100, u, p 100 format(f3.1, tr2, f9.4)
Iw (width w)
Iw.m (width w, minimum m)
For all numeric edit descriptors, if the output field is too narrow to contain the number to be output, it is filled with asterisks.
Fw.d (total width w, digits after decimal point d)
Values are rounded
Ew.d
Decimal exponent
Ew.dEe (digits of exponent e)
ENw.d
Engineering. Decimal exponent divisible by 3.
ESw.d
Scientific
Two edit descriptors as for real values
Lw (width w)
T or F on output, right-justified.
A or Aw (width w)
Tn, TLn, TRn
Tabulation, absolute, relative left, right
nX
Places n spaces in an output record. Equivalent to TRn.
n/
Starts new records (new lines).
Data edit descriptors may be preceded by a repeat count.
print "(2f9.4)", u, p
A repeat count may be applied to a group of edit descriptors, enclosed in parentheses.
print "(2(tr2, f9.4))", u, p