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 的人可以看看这个函数并找出为什么调用与子例程签名不匹配?
解决方案
推荐阅读
- python-3.x - 我的代码是不是短路了(python3)
- c# - Asp.net core中的部分视图表拖放行
- sql - 使用 OR 条件选择具有存在运算符的行
- mysql - 我如何将重叠列作为嵌套数组?NodeJS/MySQL (mysql2)
- javascript - VueJS - 数据列表输入未清除值
- reactjs - 如何在反应中添加我们的外部js文件
- c# - 使用 itext7 在 net core 中读取 PDF 返回“\n\n\n\n\n....”
- android - 平板设备中数字的 EditText inputType,总是显示额外的键
- javascript - 如何使用管道有条件地显示 innerHTML 值
- c# - 将原始 RGB 字节数组转换为 JPG 编码字符串 base64