Separating external interface and body?
From: Andy (andy_at_ideafix.litec.csic.es)
Date: 10/27/03
- Next message: Paul van Delst: "Re: Separating external interface and body?"
- Previous message: Richard: "Re: FORTRAN or COBOL first ?"
- Next in thread: Paul van Delst: "Re: Separating external interface and body?"
- Reply: Paul van Delst: "Re: Separating external interface and body?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 27 Oct 2003 19:55:12 +0100
I am trying to separate the body of a module from its external
interface. I realize the code below does not compile but, hopefully, it
illustrates what I am trying to do:
module i_fred
interface sub
subroutine sub1( i )
integer :: i
end subroutine sub1
subroutine sub2( r )
real :: r
end subroutine sub2
end interface
end module i_fred
module b_fred
use i_fred
! private declarations
contains
subroutine sub1( i )
integer :: i
write (*,*) 'sub1: ',i
end subroutine sub1
subroutine sub2( r )
real :: r
write (*,*) 'sub2 ',r
end subroutine sub2
end module b_fred
program testing
use i_fred
call sub( 1 )
call sub( 1.1 )
end program testing
- Next message: Paul van Delst: "Re: Separating external interface and body?"
- Previous message: Richard: "Re: FORTRAN or COBOL first ?"
- Next in thread: Paul van Delst: "Re: Separating external interface and body?"
- Reply: Paul van Delst: "Re: Separating external interface and body?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|