The colon (:) edit descriptor allows for conditional termination of the format. If the I/O list is exhausted before the format, then the format terminates at the colon.
* col1.f The colon (:) edit descriptor DATA INIT / 3 /, LAST / 8 / WRITE ( *, 2 ) INIT WRITE ( *, 2 ) INIT, LAST 2 FORMAT ( 1X 'INIT = ', I2, :, 3X, 'LAST = ', I2 ) END
The above program produces output like the following
INIT = 3 INIT = 3 LAST = 8
Without the colon, the output is more like this:
INIT = 3 LAST = INIT = 3 LAST = 8