(j3.2006) Is this expected to work?

Bill Long longb
Thu Nov 29 18:37:42 EST 2012



On 11/29/12 5:33 PM, Van Snyder wrote:
> Is this expected to work?
>
> module Abstract_Test
>
>    type, abstract :: T
>    contains
>      procedure(P), deferred :: B
>    end type T
>
>    abstract interface
>      pure recursive function P ( A, B ) result ( R )

You need

          import :: t

here. Interfaces don't automatically get things by host association.

Cheers,
Bill


>        class(t), intent(in) :: A, B
>        class(t), allocatable :: R
>      end function P
>    end interface
>
> end module Abstract_Test
>
> I tried it with the interface block before the type, and that also
> didn't work.
>
> If I change "abstract interface" to "contains" and delete "end
> interface", it works.
>
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
>

-- 
Bill Long                                           longb at cray.com
Fortran Technical Support    &                 voice: 651-605-9024
Bioinformatics Software Development            fax:   651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101





More information about the J3 mailing list