Fortran runtime error: End of file when reading input data -


i'm running code , i'm getting same end. trying read input file , returns error:

fortran runtime error: end of file

in other post said put in iostat specifier code looks this:

integer    :: m integer    :: st  open(unit = 13,action='read',file='data_inp.dat',status='old') read (13,*, iostat = st) m write (*,*) st write (*,*) m  allocate(winkel(m),energie(m))  = 1,m   read(13,*),winkel(i),energie(i) end 

and input file looks this:

12 -17.83 -0.019386527878 -15.83 -0.020125057233 -12.83 -0.020653853148 -11.83 -0.020840036028 -9.83 -0.020974157405 -8.83 -0.021056401707 -6.83 -0.021065517811 -5.83 -0.020992571816 -4.83 -0.020867828448 -1.83 -0.02069158012 

now terminal prints -1 iostat , changing number m.

if first read command causing error, check extraneous characters before or after "12" in input file, if created on 1 platform (windows?) , using on platform (linux? mac?)


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -