Hello,
Here is my main program:
...
use func
use mult
...
print*, my_function(func,dfunc)
...
Both func and dfunc are defined in module func:
...
function func(x)
real :: func
...
endfunction func
function dfunc
real, dimension(2) :: dfunc
...
endfunction dfunc
Also, my_function is defined in module mult likewise:
...
function my_function(func,dfunc)
real, external :: func
real, external :: dfunc
...
endfunction my_function
I get this error at compile-time:
"The shape matching rules of actual arguments and dummy arguments have been violated" referring to dfunc, which is an array of size 2.
What should I do?
Thanks!!
Here is my main program:
...
use func
use mult
...
print*, my_function(func,dfunc)
...
Both func and dfunc are defined in module func:
...
function func(x)
real :: func
...
endfunction func
function dfunc
real, dimension(2) :: dfunc
...
endfunction dfunc
Also, my_function is defined in module mult likewise:
...
function my_function(func,dfunc)
real, external :: func
real, external :: dfunc
...
endfunction my_function
I get this error at compile-time:
"The shape matching rules of actual arguments and dummy arguments have been violated" referring to dfunc, which is an array of size 2.
What should I do?
Thanks!!