Fortran77:星号(*)在子例程参数中是什么意思?

时间:2019-06-20 07:04:33

标签: fortran fortran77

我对scipy.interpolate.splrep遇到了一些问题,因此,我别无选择地研究一些非常古老的Fortran77代码。

我不明白的一件事是在这里: https://github.com/scipy/scipy/blob/master/scipy/interpolate/fitpack/curfit.f#L257

它调用子例程fpcurf

      call fpcurf(iopt,x,y,w,m,xb,xe,k,s,nest,tol,maxit,k1,k2,n,t,c,fp,
     * wrk(ifp),wrk(iz),wrk(ia),wrk(ib),wrk(ig),wrk(iq),iwrk,ier)

其中wrk是一维数组

并且fpcurf的签名是

      subroutine fpcurf(iopt,x,y,w,m,xb,xe,k,s,nest,tol,maxit,k1,k2,
     * n,t,c,fp,fpint,z,a,b,g,q,nrdata,ier)
c  ..
c  ..scalar arguments..
      real*8 xb,xe,s,tol,fp
      integer iopt,m,k,nest,maxit,k1,k2,n,ier
c  ..array arguments..
      real*8 x(m),y(m),w(m),t(nest),c(nest),fpint(nest),
     * z(nest),a(nest,k1),b(nest,k2),g(nest,k2),q(m,k1)
      integer nrdata(nest)

您可以在https://github.com/scipy/scipy/blob/master/scipy/interpolate/fitpack/fpcurf.f

上找到它

显然签名不匹配(因为wrk是数组,而wrk[xxx]是标量)。谁能解释为什么?我注意到这里有一个星号(*),这有什么特别的意思吗?

也许熟悉Fortran的任何人都可以看一下此功能,并弄清楚为什么调用与子例程签名不匹配?

0 个答案:

没有答案