(j3.2006) Is this expected to work?

Bader, Reinhold Reinhold.Bader
Thu Nov 29 18:45:34 EST 2012


Hello Van, 

As is this is not conforming, because you don't get access to the type definition inside the interface block. 
With an added

import :: t

statement the module builds for me with ifort 12.1, gfortran 4.7 and NAG 5.3.1

Best wishes
Reinhold

> -----Urspr?ngliche Nachricht-----
> Von: j3-bounces at mailman.j3-fortran.org [mailto:j3-bounces at mailman.j3-
> fortran.org] Im Auftrag von Van Snyder
> Gesendet: Freitag, 30. November 2012 00:33
> An: j3
> Betreff: (j3.2006) Is this expected to work?
> 
> 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 )
>       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



More information about the J3 mailing list