回 帖 发 新 帖 刷新版面

主题:fortran 格式错误,请大侠帮忙

At line 51 of file istop2.f
Fortran runtime error: Constant string in input format (' ')
错误如上所示,请求大侠帮助。。。。小弟系程序初学者。。。。
程序的上下文如下:用f95编译的,编译通过。运行的时候出的问题。
       
      open(11, file='chi.values', status='old',CONVERT='BIG_ENDIAN')
      open(13, file='stop.in', status='old') 
      open(14, file='lambda', status='old')

      read(14,*) lambda

      read(11,1)
      read(11,1)
1     format(' ')

      chimin=1.e20

      i=1
100   read(11,5,end=999) chi
5     format(43x,f11.5)
      if((chi.gt.chimin.and.chimin.gt.1.).or.abs(chi-1.).lt.tol) then
        write(13,*) 1

        open(38, file='log.file')
155     read(38,55,end=98) alog
55      format(a1)
        go to 155
c

回复列表 (共1个回复)

沙发

read (11,1)
      read (11,1)
1     format(' ')
这个不对。
改为:
      read (11,*)
      read (11,*)
然后去掉:
1     format(' ')

我来回复

您尚未登录,请登录后再回复。点此登录或注册