0

I'm trying to define a function in my module code and call it in the main fortran code but when I want to compile my code I'm receiving this error :

This actual argument must be the name of an external user function or the name of an intrinsic function.

and my function is :

Function func (x)  
   implicit none  
   double precision func,x  
   func=x  
   RETURN  
end function func

and in the main code

call Romberg (dra,func,ra(mm),ra(kk))

I want to measure the destance between ra(mm) & ra(kk)

4

1 回答 1

1

添加:

external func

在来电者中。这告诉调用者“func”是一个外部过程。您显然已经使用显式接口声明了 Romberg,指定参数是一个过程。

于 2013-08-28T18:58:26.690 回答