well this was new to me too. so i tried it out (program attached).
surprisingly (for me) it works and the interfaces seem to merged
together (provided there is no ambiguity)
renchi
On Fri, May 16, 2003 at 06:43:59PM -0400, Aleksandar Donev wrote:
> Hello,
>
> A question about Fortran 95:
>
> module A
> interface X
> ...
> end interface X
> end module A
>
> module B
> interface X
> ...
> end interface X
> end module B
>
> module C
> use A
> use B
> end module C
>
> What specific are in the generic wrapper X in module C (this may not be
> legal). The ones from A, B or both. What if I use A in module B?
>
> Thanks,
> Aleksandar
module A
interface X
module procedure fun1
end interface
contains
subroutine fun1(dummy)
integer :: dummy
print*, "Do A"
end subroutine fun1
end module A
module B
interface X
module procedure fun2
end interface
contains
subroutine fun2(dummy)
real :: dummy
print*, "Do B"
end subroutine fun2
end module B
module C
use A
use B
end module C
program test
use C
implicit none
call X(5)
call X(5.0)
end program test
|