Fortran隐式声明中的错误 [英] Error in implicit declaration in Fortran
本文介绍了Fortran隐式声明中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经检查了隐式类型声明的所有格式,但无法在下一行中找到错误.我一直在使用f77运行代码来进行编译.
I have checked all the formats of the implicit type declaration but have not been able to find out the error in the following line . I have been running the code using f77 to compile this.
隐式实数* 4(a-h,o-z)
implicit real*4 (a-h,o-z)
在运行程序时,对于上述语句会给出以下错误.
while running the program it gives the following error for the above statement.
隐式实数* 4(a-h,o-z)
1
错误:变量列表中(1)处的意外字符
推荐答案
如果您使用的是F77或更早版本,则应遵循一些基本规则.
A few basic rules if you are using F77 or earlier versions.
- 先放置隐式线
- 第1-5列用于标签
- 第6列用于续行
- 在第7列中启动代码
- 代码不应超过第72列.某些编译器可以选择将行长扩展为80或120或132(F77首次问世时行打印机的宽度)
如果您希望使用自由格式,请使用fortran的更高版本之一.
If you wish to use free format, use one of the later versions of fortran
这篇关于Fortran隐式声明中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文