Dear all,
I am wondering, why the recent PGI-Fortran compiler (release 17.10) interprets the strings “Fe” and “Te” as integers. The following program
program test
implicit none
integer :: ii, iError
character(2) :: str
str = "Fe"
ii = -2
read(str, *, iostat=iError) ii
print *, "iError:", iError
print *, "II:", ii
end program test
outputs
iError: 0
II: 0
which in contrast to my expectations and also to what all other compilers I have tried generate.
Best,
Bálint