next up previous contents index
Next: JZ91 -- Processor Up: Formats for the Previous: Free-field input

Fortran formatted input

With Fortran formatted input all the data for the complete title bank are read with a single READ statement using the format given on the header line. For this to be possible the exact number of words to be read must be specified with the -N option.

Example

       *DO  FIDU 1 -IF -N37 -F(10X,F10.0/(10X,3F10.0))
                   12.
        1 4   1     1.     -17.2475  -18.6369
        1 4   2     2.     -17.2595   -4.2708
        1 4   3     3.       -.7761   -4.3177
        1 1   1    11.     -13.8081  -15.9118
        1 1   2    12.     -13.7343   -7.5253
        1 1   3    13.      -4.8669   -7.5898
        1 1   4    14.      -4.8931  -15.9473
        1 2   1    21.     -13.0353  -15.6000
        1 2   2    22.     -12.8979   -7.3464
        1 2   4    24.      -3.7895  -15.6767
        1 3   3    33.      -2.6674  -17.2822
        1 3   4    34.      -3.1636  -17.8522
       *.-------1---------2---------3---------4---------5

The option -IF specifying the I/O characteristic is important in this case. It causes the execution of a Fortran READ statement with an I/O list of type REAL; on some machines Fortran is not able to read acting solely under FORMAT control, ignoring the type of the I/O list.


Janne Saarela
Mon May 15 08:34:47 METDST 1995