Fortran 运行时警告 : Extension: $ descriptor

标签 fortran gfortran

我正在使用来自第三方的非常旧的 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/

相关文章:

c - 如何使用使用 c 头文件和 fortran 库的 fortran 源代码在 matlab 中实现?

matrix - LAPACK 给我错误的特征值

python-3.x - python-fortran集成: callback comparison between f2py and ctypes

fortran - 使用 MPI-2 的 RMA 函数的 Fortran 程序中的段错误

cmake - 在 cmake 混合语言项目中使用 FORTRAN 链接器

syntax - Fortran 中的“elseif”或 'else if'

arrays - 声明数组的不同语法 : with and without the dimension statement

fortran - 为什么重写参数的名称必须与抽象接口(interface)的名称匹配?

compiler-errors - 为什么在编译时MinGW无法识别我的目标文件?

PGI Fortran 中的随机数生成器不是那么随机