Fortran 中的星号:(1) 处参数列表中的语法错误
在下面的fortran77代码中,有这个子程序定义,
SUBROUTINE MSIRNS ( D , NOBST , N , X , R , RR , SURFT ,
, INOBSI , ISUR , IDELTS , IRELPS ,
, RNOBSI , RSUR , RDELTS , RRELPS ,
, OBSD , * , * )
最后两个参数星号的含义是什么?
那么我该如何调用该函数呢?
我尝试了所有这些变体
RES = CALL MSIRNS (D, NOBST, N, X, R, RR, SURFT, INOBSI, ISUR, IDELTS, IRELPS, RNOBSI, RSUR, RDELTS, RRELPS, OBSD, *, *)
CALL MSIRNS (D, NOBST, N, X, R, RR, SURFT, INOBSI, ISUR, IDELTS, IRELPS, RNOBSI, RSUR, RDELTS, RRELPS, OBSD, *, *)
RES = CALL MSIRNS (D, NOBST, N, X, R, RR, SURFT, INOBSI, ISUR, IDELTS, IRELPS, RNOBSI, RSUR, RDELTS, RRELPS, OBSD)
,但总是得到
错误:(1) 处参数列表中存在语法错误
In the following fortran77 code, there is this subroutine definition
SUBROUTINE MSIRNS ( D , NOBST , N , X , R , RR , SURFT ,
, INOBSI , ISUR , IDELTS , IRELPS ,
, RNOBSI , RSUR , RDELTS , RRELPS ,
, OBSD , * , * )
what is the meaning of the two last arguments, asterisks?
and how can I therefore call the function?
I tried all these variants
RES = CALL MSIRNS (D, NOBST, N, X, R, RR, SURFT, INOBSI, ISUR, IDELTS, IRELPS, RNOBSI, RSUR, RDELTS, RRELPS, OBSD, *, *)
CALL MSIRNS (D, NOBST, N, X, R, RR, SURFT, INOBSI, ISUR, IDELTS, IRELPS, RNOBSI, RSUR, RDELTS, RRELPS, OBSD, *, *)
RES = CALL MSIRNS (D, NOBST, N, X, R, RR, SURFT, INOBSI, ISUR, IDELTS, IRELPS, RNOBSI, RSUR, RDELTS, RRELPS, OBSD)
but always get
Error: Syntax error in argument list at (1)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个备用返回说明符:
http://www.fortran .com/F77_std/rjcnf0001-sh-15.html#sh-15.8.3
在调用 MSIRNS() 的代码中,您需要将星号替换为“*N”,其中N是备用返回行的标签。
It's an alternate return specifier:
http://www.fortran.com/F77_std/rjcnf0001-sh-15.html#sh-15.8.3
In the code that calls MSIRNS(), you need to replace the asterisks with "*N", where N is the label of the alternate return line.