mikibelavista
Technical User
- Jan 18, 2012
- 32
My file:
3515 2.154
3516 2.126
3517 2.098
3518 2.063
3519 2.084
3520 2.114
3521 2.128
.
.
13093 2.302
13094 2.294
13095 2.29
13096 2.314
13097 2.314
13098 2.294
13099 2.294
13100 2.279
9586 lines in the file.
My code:
program pr2
implicit none
integer :: i,j
real,dimension(9586) :: c
integer,dimension(9586) :: k
open(10,file='gom.dat')
do i=1,9586
read(10,51)k(i),c(i)
51 format(i5,3x,f5.3)
end do
end program
gfortan gives
At line 13 of file pr2.f90 (unit = 10, file = 'gom.dat')
Fortran runtime error: Bad value during integer read
ifort:
forrtl: severe (64): input conversion error, unit 10,
Why?
3515 2.154
3516 2.126
3517 2.098
3518 2.063
3519 2.084
3520 2.114
3521 2.128
.
.
13093 2.302
13094 2.294
13095 2.29
13096 2.314
13097 2.314
13098 2.294
13099 2.294
13100 2.279
9586 lines in the file.
My code:
program pr2
implicit none
integer :: i,j
real,dimension(9586) :: c
integer,dimension(9586) :: k
open(10,file='gom.dat')
do i=1,9586
read(10,51)k(i),c(i)
51 format(i5,3x,f5.3)
end do
end program
gfortan gives
At line 13 of file pr2.f90 (unit = 10, file = 'gom.dat')
Fortran runtime error: Bad value during integer read
ifort:
forrtl: severe (64): input conversion error, unit 10,
Why?