FORTRAN编译错误

时间:2010-11-25 16:40:21

标签: fortran

f77    -c -o alqueva.o alqueva.f
alqueva.f: In program `ssssss':
alqueva.f:402: 
           DO WHILE (.NOT. EOF(12))
                     1     2
.NOT. operator at (1) must operate on subexpression of logical type, but the subexpression at (2) is not of logical type
alqueva.f:415: 
                   DO WHILE (.NOT. EOF(iread))
                             1     2
.NOT. operator at (1) must operate on subexpression of logical type, but the subexpression at (2) is not of logical type
make: *** [alqueva.o] Error 1

1 个答案:

答案 0 :(得分:2)

我做了很多事情已经有一段时间了,但我不相信EOF函数是fortran 77标准的一部分,而且我总是使用end = label idiom

10 read (blah,end=20)
   process stuff
   goto 10
20 close (blah) 

(但可能使用do代替goto ...)

Here is page which discusses several options包括上述内容和基于iostat

的内容