FORTRAN 编译错误

发布于 2024-10-04 01:50:58 字数 542 浏览 2 评论 0原文

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
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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

度的依靠╰つ 2024-10-11 01:50:58

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

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

(但可能使用 < code>do 而不是 goto...)

这是讨论几个选项的页面,包括上述选项和基于 iostat 的选项

It's been a while since I did much fortran, but I don't believe that the EOF function is part of the standard for fortran 77, and I always used the end=label idiom

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

(but possibly using do instead of goto...)

Here is page which discusses several options including the above and one based on iostat

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文