Hello,
In Fortran 90 global variables are done via modules:
module shared
real :: x_copy
contains
> FUNCTION f(x)
> real, intent(in):: x
> real :: f,h
x_copy=x
> f= integral of h respect to y, where h depends on both x and y
> END FUNCTION
>
> FUNCTION h(y)
> real, intent(in) :: y
> real :: h
> h=(x_copy*y)*(y**2) <---- here I need something to make the program
> understand that it must use the x declared as
> input in f(x)
> END FUNCTION
end module shared
|