I have a compiler that objects to the following. I think it's OK.
module A
private
interface S; module procedure S_; end interface S
public S
contains
subroutine S_ ( I )
integer I
...
end subroutine S_
end module A
module B
use A
private
interface S; module procedure S_; end interface S
public S
contains
subroutine S_
call S ( 10 )
end subroutine S_
end module B_
program P
use B
call S
end program P
At the "use B" in program P, the compiler complains that it has
two specific procedures S_.
Shouldn't A%S_ and B%S_ be well hidden by PRIVATE statements, and/or
qualified in some hidden compiler-specific way by their module names?
Best regards,
Van Snyder
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|