Hello Bill,
you are totally right. I tried to pass the actual name of Func1d through
the argument list of the subroutines.
SUBROUTINE sub1(Func1d, ...)
This procedure was not necessary, since an interface definition provided
at the module header is available in all module subroutines.
Göran
> Unless I misunderstood your question, you shouldn't need the EXTERNAL. The
> following
> should work:
>
> MODULE whatever
>
> INTERFACE
> FUNCTION Func1d(x)
> USE Num_const
> REAL(RS), INTENT(IN) :: x
> REAL(RS) :: Func1d
> END FUNCTION Func1d
> END INTERFACE
>
> CONTAINS
>
> SUBROUTINE sub1
> USE Num_const
> REAL(RS) :: a,b
> a = Func1d(b)
> END SUBROUTINE sub1
>
> SUBROUTINE sub2
> [etc, etc]
>
> END MODULE whatever
>
> Here all the subroutines know the interface for Func1d by "host association",
> and
> hence do not need to declare Func1d.
>
> Bill
>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|