HP 3000 Manuals

Processing a Format Specification [ HP FORTRAN 77/iX Reference ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Reference

Processing a Format Specification 

A formatted input/output statement references each element in a series of
list elements, and the corresponding format specification is scanned to
find a format descriptor for each list element.  As long as a list
element and field descriptor pair occurs, normal execution continues.

If a program does not provide a one-to-one match between list elements
and format descriptors, execution continues only until a format
descriptor, an outer right parentheses, or a colon is encountered and
there are no list items left.  If there are fewer format descriptors than
list elements, the following three steps are performed:

   1.  The current record terminates.

   2.  A new record begins.

   3.  Format control returns to the repeat specification for the
       rightmost specification group at nested level 1.  If there is no
       group at level 1, control returns to the first descriptor in the
       format specification.

                 Examples                                      Notes 

---------------------------------------------------------------------------------------

(I5,2(3X,I2,(I4)))                          Control returns to 2(3X,I2,(I4))

(F4.1,I2)                                   Control returns to (F4.1,I2)

(A3,(3X,I2),4X,I4)                          Control returns to (3X,I2),4X,I4

When part or all of a format specification is repeated, the current scale
factor is not changed until another scale factor is encountered.
Repetition also has no effect on the BN and BZ edit descriptors.



MPE/iX 5.0 Documentation