What is * in FORTRAN 77

試著忘記壹切 提交于 2019-12-25 02:49:10

问题


I'm using Radau.f Fortran ode-solver and my gfortran complains about the use of *

For example in:

            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?


回答1:


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.

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.

An asterisk in the first column, on the other hand, denotes a comment line (as do c and !).



来源:https://stackoverflow.com/questions/29353944/what-is-in-fortran-77

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!