【发布时间】:2016-06-29 21:55:03
【问题描述】:
这是我的 Fortran 90 代码:
program test
implicit none
integer*4 nxProjPad, cf, numViews, cc, index, indRad, iv, i
real*4 v4, v5, SS
nxProjPad=185
numViews=180
v4 = 0.
v5 = 0.
SS = 0.
cf = NINT(nxProjPad/2.)
do iv = 1, numViews
do i = 1, nxProjPad
v4 = v4 + array(index)
v5 = v5 + array(indRad)
SS = SS + ABS(array(index))
indRad = indRad + 1
index = index + 1
enddo
enddo
end
我总是得到错误:
test.f90:19:15:
v4 = v4 + array(index)
1
Error: Function ‘array’ at (1) has no IMPLICIT type
test.f90:21:15:
v5 = v5 + array(indRad)
1
Error: Function ‘array’ at (1) has no IMPLICIT type
test.f90:23:14:
SS = SS + ABS(array(index))
1
Error: Function ‘array’ at (1) has no IMPLICIT type
我已经搜索并看到了类似的答案,但仍然无法解决我的问题。欢迎提出任何建议,并提前致谢!
【问题讨论】:
-
你认为
array是什么?编译器认为这是一个您没有为其提供定义的函数。我看不到任何名为array的东西的任何声明。 -
对您的 Fortran 问题使用标签
fortran您可以在必要时添加特定版本(不在此处)。
标签: function compiler-errors fortran