FORTRAN 77中的*是什么 [英] What is * in FORTRAN 77
问题描述
我正在使用Radau.f
Fortran ode-solver,而我的gfortran
抱怨使用*
I'm using Radau.f
Fortran ode-solver and my gfortran
complains about the use of *
例如:
FF(I)=TI711*Z1I+TI712*Z2I+TI713*Z3I+TI714*Z4I+TI715*Z5I
* +TI716*Z6I+TI717*Z7I
*
代表什么?是&
使得该行应为:
what is *
standing for? Is it an &
such that the line should be:
FF(I)=TI711*Z1I+TI712*Z2I+TI713*Z3I+TI714*Z4I+TI715*Z5I+&
& +TI716*Z6I+TI717*Z7I
还是应该是评论或其他内容?
Or is it supposed to be a comment or something else?
推荐答案
第6列中的星号是行继续符号,等效于&
.有关详细信息,请参见此处.实际上, 任何字符(零或空白除外)" 有效表示行继续.
An asterisk in column 6 is a line continuation symbol and equivalent to &
in fixed form. See here for details. In fact, "any character (except a zero or blank)" is valid to indicate a line continuation.
在自由格式 Fortran中,在最后一个位置(也可以选择在下一行的开头)的&符也是如此.对于固定形式,第二个&"号是必需的.
An ampersand at the last position (and optionally in the beginning of the next line) does the same for free form Fortran. For fixed form, the second ampersand is mandatory.
另一方面,第一列中的星号表示注释行(与c
和!
一样).
An asterisk in the first column, on the other hand, denotes a comment line (as do c
and !
).
这篇关于FORTRAN 77中的*是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!