我正在使用IMSL Fortran库中的函数NEQNF来解决非线性方程组并得到3个错误。我在x64系统上使用Visual Studio 2017。该错误表示以下内容:
Error #7061: The characterístic of dummy argument 1 of the associated actual procedure differ from the characteristics of dummy argument 1 of the dummy procedure [FCN_SS]
Error #7062: The characterístic of dummy argument 2 of the associated actual procedure differ from the characteristics of dummy argument 2 of the dummy procedure [FCN_SS]
Error #7063: The characterístic of dummy argument 3 of the associated actual procedure differ from the characteristics of dummy argument 3 of the dummy procedure [FCN_SS]
代码是:
include 'link_fnl_shared.h'
use neqnf_int
use umach_int
implicit none
!Declaring variables
.
.
.
Contains
subroutine solve_ss(x, fnorm)
integer n
parameter (n=2)
integer k, nout
real(dp) :: fnorm, x(n), xguess(n)
data xguess/1.0_dp, 0.3_dp/ !guess for total output in units
call umach (2, nout)
call neqnf (fcn_ss, x, xguess=xguess, fnorm=fnorm)
end subroutine solve_ss
subroutine fcn_ss(x, f, n)
implicit none
!specification
integer n
real(dp) :: x(n), f(n)
.
.
.
F(1)=...
F(2)=...
end subroutine fcn_ss
我不确定错误的出处,因为变量solve_ss
和fcn_ss
中的变量声明是相同的。