Fortran运行时警告:扩展名:$描述符 [英] Fortran runtime warning: Extension: $ descriptor

查看:295
本文介绍了Fortran运行时警告:扩展名:$描述符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用来自第三方的非常旧的Fortran 77代码(也非常麻烦)。我已经编译了

  FFLAGS = -O0 -Wall -g -fbacktrace -pedantic -Wextra 













在第<号码> < namefile> .f(unit = 6,file ='stdout')
Fortran运行时警告:扩展名:$ descriptor

我想知道这是什么意思。



$

中的作用

  write(*,'(a $)')string
pre

是为了避免在屏幕上打印字符串后进入下一行。



然而,描述符是非标准的,因此编译器会提醒您。



标准方法是使用非前进输入/输出:

  write(*,'(a)',advance =no)string


I am using a very old Fortran 77 code from third party (also very bugged). I have compiled with

FFLAGS=-O0 -Wall -g -fbacktrace -pedantic -Wextra

I am getting the warning in the title at runtime:

At line <number> of file <namefile>.f (unit=6, file='stdout')
Fortran runtime warning: Extension: $ descriptor

I would like to figure out what that means.

解决方案

You should always show the code line number in the error or warning message, to which the line points.

The role of $ in

write(*,'(a$)') "string"

is to avoid going to the next line after printing "string" on the screen.

However, the descriptor is non-standard and therefore you are warned about this by the compiler.

The standard way is to use non-advancing input/output:

write(*,'(a)', advance="no") "string"

这篇关于Fortran运行时警告:扩展名:$描述符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆