module Subset procedure(SubRotInt0),pointer::subrot1a procedure(SubRotInt0),pointer::subrot1b procedure(SubRotInt1),pointer::subrot2a procedure(SubRotInt1),pointer::subrot2b abstract interface subroutine SubRotInt0 end subroutine SubRotInt0 subroutine SubRotInt1(iovar) double precision,intent(in)::iovar end subroutine SubRotInt1 end interface contains subroutine SetSubset subrot1a => mysub1a subrot1b => mysub1b subrot2a => mysub2a subrot2b => mysub2b end subroutine SetSubset subroutine SetSubsetNull subrot1a => Dummy1 subrot1b => Dummy1 subrot2a => Dummy2 subrot2b => Dummy2 end subroutine SetSubsetNull subroutine SwapSubset procedure(SubRotInt0),pointer::tmpptr1 => NULL() procedure(SubRotInt1),pointer::tmpptr2 => NULL() tmpptr1 => subrot1a subrot1a => subrot1b subrot1b => tmpptr1 tmpptr2 => subrot2a subrot2a => subrot2b subrot2b => tmpptr2 end subroutine SwapSubset subroutine mysub1a write (*,*) "Calling mysub1a" end subroutine mysub1a subroutine mysub1b write (*,*) "Calling mysub1b" end subroutine mysub1b subroutine mysub2a(iovar) double precision,intent(in)::iovar write (*,*) "Calling mysub2a with ", iovar end subroutine mysub2a subroutine mysub2b(iovar) double precision,intent(in)::iovar write (*,*) "Calling mysub2b with ", iovar end subroutine mysub2b subroutine Dummy1 end subroutine subroutine Dummy2(iovar) double precision, intent(in)::iovar end subroutine end module SubSet