我正在使用来自第三方的非常旧的 Fortran 77 代码(也有很多 bug)。我已经编译了
FFLAGS=-O0 -Wall -g -fbacktrace -pedantic -Wextra
我在运行时收到标题中的警告:
At line <number> of file <namefile>.f (unit=6, file='stdout')
Fortran runtime warning: Extension: $ descriptor
我想弄清楚这意味着什么。
最佳答案
您应该始终在错误或警告消息中显示该行所指向的代码行号。
$
的作用
write(*,'(a$)') "string"
是为了避免在屏幕上打印“string”后转到下一行。
但是,描述符是非标准的,因此编译器会对此发出警告。
标准方法是使用非高级输入/输出:
write(*,'(a)', advance="no") "string"
关于Fortran 运行时警告 : Extension: $ descriptor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42832997/