From [log in to unmask] Tue Nov 25 12:33:25 1997
From: Van Snyder <[log in to unmask]>
Subject: Question about generics
To: [log in to unmask]
Date: Mon, 24 Nov 1997 17:25:07 PST
I tried the following with two compilers, and it didn't work. I
think it ought to.
==========================================================================
module m1
interface foo
module procedure foo
end interface
private
contains
subroutine foo ( x )
real x
x = 0.0
return
end subroutine foo
end module m1
module m2
interface foo
module procedure foo
end interface
private
contains
subroutine foo ( x )
double precision x
x = 0.0d0
return
end subroutine foo
end module m2
program test
use m1
use m2
real R
double precision D
call foo (r)
call foo (d)
end program test
===========================================================================
You'll need different names for each procedure.
~~~~~~~~~
It is usual to have all the procedures for a given
generic function in the one module.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|