Fortran 2003



Hi,

I'm trying to use the procedure pointer to create a method for a
derived type. The code is as follows:


module mymod

type :: mytype
integer :: i
procedure(seti_interface), pointer :: seti
end type

interface
subroutine seti_interface(this,i)
import
type(mytype), intent(out) :: this
integer, intent(in) :: i
end subroutine seti_interface
end interface

contains

subroutine seti_interface(this,i)
type(mytype), intent(out) :: this
integer, intent(in) :: i
this%i=i
end subroutine seti_interface

end module mymod

program Test_03
use mymod
implicit none

type(mytype) :: m

call m%seti(5)

end program Test_03


Unfortunately this doesn't compile (complaining about a name conflict
for seti_interface). I'm using Intel Visual Fortran v11.

Any ideas about where I'm going wrong?

Thanks in advance,

Cliff
.