If dummy[12] are external procedures, then just put the generic
name "Generic" on the FIRST interface statement and get rid of
the second, which says that they are module procedures.
Aleksandar Donev wrote:
>
> Hello,
>
> I am unable to get Lahey F95 to resolve a generic interface of the following
> form:
>
> program test
> interface
> subroutine dummy1(array)
> integer(kind=1), dimension(*) :: array
> end subroutine
> subroutine dummy2(array)
> integer(kind=2), dimension(*) :: array
> end subroutine
> end interface
>
> INTERFACE Generic
> module procedure dummy1
> module procedure dummy2
> END INTERFACE Generic
>
> integer(kind=1), dimension(10) :: array1D
> integer(kind=1), dimension(10,10) :: array2D
> call Generic(array1D) ! THIS WORKS
> call Generic(array2D) ! THIS DOES NOT WORK
> end program test
>
> Why doesn't the call with a rank-2 array not work, if this is one of the
> main purposes of assumed-size arrays? Is there any way for this kind of
> thing to work without wrapping the whole thing into another routine which
> uses assumed-shape array arguments or rank 1 and 2 respectively?
>
> Thanks a lot,
> Aleksandar
>
> _____________________________________________
> Aleksandar Donev
> http://www.pa.msu.edu/~donev/
> [log in to unmask]
> (517) 432-6770
> Department of Physics and Astronomy
> Michigan State University
> East Lansing, MI 48824-1116
> _____________________________________________
--
Walt Brainerd [log in to unmask]
Unicomp, Inc. +1-520-298-7212 298-7074 (fax)
7660 E. Broadway, Suite 308 888-330-6060
Tucson, AZ 85710 USA http://www.uni-comp.com
|