------- Comment #2 from tobias dot burnus at physik dot fu-berlin dot de  
2006-04-12 21:05 -------
If one replaces the third read by
  character(len=300) :: str
  READ (5,*,END=100,ERR=99) str
  WRITE(*,*) trim(str)
one sees that the first two failing READs advance by one character each
('i','g').
The third (string) read then reads up to the comma ('td=1')

I would expect (as well as the program writer) that after the failed read one
is still in the next line (as ADVANCE=YES is implied).

Why the read(5,*) str only reads up to the comma and not the whole line, is
also an enigma for me.

G95 (GCC 4.0.3 (g95!) Apr  4 2006,
pgf95 6.0-5
PathScale EKOPath Version 2.1
(and as mentioned) Intel Fortran Compiler 9.0.033
all read the "12" with the second read.


-- 

tobias dot burnus at physik dot fu-berlin dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|gfortran: Fails to          |gfortran: read(*,*) myInt
                   |                            |advances only one character
                   |                            |on error


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27138

Reply via email to