Hi everybody.
I'm new in the community of Fortran. I have a problem with a code I'm trying to write using Fortran95. I need my code read an array of unknown size from a file. I know how find the dimensions of the array and how allocate it but when I try to read the numbers into the array I get this error and I can't figure out what is the problem. I attach some part of the code to better explain.
!Reading the arrays
integer, parameter:: kp=selected_real_kind(18,50)
real(kp),dimension,,allocatable:: A
integer :: A_rows, A_col
..........
..........
allocate(A(A_rows,A_col))
doI=1,A_rows
read(iu,200,end=90)A(I,
write(*,200)A(I,
end do
90continue
200format(5E18.6)
Fortran runtime error: Bad value during floating point read
Thanks for any help.
I'm new in the community of Fortran. I have a problem with a code I'm trying to write using Fortran95. I need my code read an array of unknown size from a file. I know how find the dimensions of the array and how allocate it but when I try to read the numbers into the array I get this error and I can't figure out what is the problem. I attach some part of the code to better explain.
!Reading the arrays
integer, parameter:: kp=selected_real_kind(18,50)
real(kp),dimension,,allocatable:: A
integer :: A_rows, A_col
..........
..........
allocate(A(A_rows,A_col))
doI=1,A_rows
read(iu,200,end=90)A(I,
write(*,200)A(I,
end do
90continue
200format(5E18.6)
Fortran runtime error: Bad value during floating point read
Thanks for any help.