请教大家,下面这段代码里面的d0(),d1()以及d2()是三个函数吗?这段代码在pgf90编译器上是可以编译通过的,但是在inter Fortran上编译通不过
[Fortran] 纯文本查看 复制代码 function ppvalw (coef, x, jd )
implicit integer*4 (i-n), real*8 (a-h, o-z)
real*8 ppvalw,x
dimension coef(4)
d2(xx) = coef(4)*xx + coef(3)
d1(xx) = (coef(4)*xx/2. + coef(3))*xx + coef(2)
d0(xx) = ((coef(4)*xx/3. + coef(3))*xx/2. +
. coef(2))*xx + coef(1)
goto (1,2,3) jd+1
ppvalw = 0.
print *, 'Error (ppvalw): JD must be 0, 1, or 2.'
print *, 'Execution terminated.'
return
1 ppvalw = d0(x) ! k = 4 , jd = 0
return
2 ppvalw = d1(x) ! k = 4 , jd = 1
return
3 ppvalw = d2(x) ! k = 4 , jd = 2
return
end
|