Fortran Coder

标题: Fortran实参与形参不匹配 [打印本页]

作者: lveZ    时间: 2020-10-13 21:23
标题: Fortran实参与形参不匹配
下面是我调用函数过程以及相关参数的定义
implicit real*8 (a-h,o-z)
      real*8 ,external ::Ne
& FF0N,xm0N)

  dimension R(3)

dimension FF0(988),xm0(441), FF0N(988),xm0N(441)

  eld= Ne(h,alat,along,mth,flx,UT,R,ttt,FF0,xm0,
     & FF0N,xm0N)
以下是是子函数定义:
   real*8 function Ne(h,alat,along,mth,flx,UT,R,ttt,FF0,xm0,
     & FF0N,xm0N)

      implicit real*8 (a-h,o-z)
       dimension FF0(988),xm0(441), FF0N(988),xm0N(441)
      dimension R(3)

但是在编译过程中显示error #6784: The number of actual arguments cannot be greater than the number of dummy arguments.形参合实参不匹配,我没有看出来哪里不匹配,请大家帮我看看。




作者: ahafigure    时间: 2020-10-14 16:08
是不是因为你mth没声明,

作者: fcode    时间: 2020-10-15 08:34
此问题需要更详细的代码判断问题。(尤其注意,是否有多个Ne函数存在?)




欢迎光临 Fortran Coder (http://bbs.fcode.cn/) Powered by Discuz! X3.2