HP 3000 Manuals

List-Directed READ Statements [ HP FORTRAN 77/iX Migration Guide ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Migration Guide

List-Directed READ Statements 

HP FORTRAN 77 handles list-directed input differently from FORTRAN 66/V.
FORTRAN 66/V allows you to input fewer values than the number of
variables in a READ statement.  HP FORTRAN 77/V requires that you either
supply a value for each variable in the READ statement or append a slash
(/) after the last value.

For example, for the source lines

     REAL A,B
     READ (5,*) A,B

in FORTRAN 66/V you can input a value for A, followed by a carriage
return.  In HP FORTRAN 77/V, you must enter values for A and B or else
input a value for A and follow it with a slash (/).

If your program uses list-directed READs from a data file and any lines
in the data file contain fewer input values than the READ expects, append
a slash to the end of each line (this can be done with a global command
through your editor).



MPE/iX 5.0 Documentation