possible bug in f77 list-directed i/o

David McQueen mcqueen at acf3.NYU.EDU
Thu Mar 28 10:24:00 AEST 1991


We have observed what we think is improper behavior of list-directed i/o in a
Fortran on our Personal IRIS running IRIX 3.3.1. Running the following program
 
      a = 0.0
      b = 0.0
      c = 0.0
      read(5,*,err=99) a,b,c
      write(6,*) a,b,c
      stop
   99 write(6,*)'error reading data'
      stop
      end

with an input file which consists of a single line:
1 2 3
elicits the (good) result:

    1.000000       2.000000       3.000000

but running with an input file consisting of the line:
x y z
elicits the (we think bad) result:

   0.0000000E+00  0.0000000E+00  0.0000000E+00

On a Sun 3/50 running SunOS 4.1 we obtain for the above two cases respectively

    1.00000    2.00000    3.00000

and

error reading data

which we think makes more sense.

Is this behavior of the Personal IRIS in accordance with standard Fortran?

--David McQueen, Courant Institute, New York University



More information about the Comp.sys.sgi mailing list