Re: Passing module procedures to external procedures -- type issues
- From: robert.corbett@xxxxxxx
- Date: Mon, 22 Sep 2008 23:56:18 -0700 (PDT)
On Sep 19, 11:25 pm, nos...@xxxxxxxxxxxxx (Richard Maine) wrote:
<robert.corb...@xxxxxxx> wrote:
On Sep 19, 6:52 pm, Rich Townsend <r...@xxxxxxxxxxxxxxxxxxx> wrote:
module foo
implicit none
contains
subroutine main_sub ()
call internal_sub()
contains
subroutine internal_sub()
call QAG(other_sub)
end subroutine internal_sub
end subroutine main_sub
subroutine other_sub ()
end subroutine other_sub
end module foo
---CUT---
Is my code standard conforming or not?
It is not standard conforming code. As Glen Hermannsfeldt
suggests, you need to either provide an explicit interface
for other_sub or declare it in an EXTERNAL statement. My
guess is that Intel Fortran will report the error to you
if you use the right compiler option.
Either Bob's missing something or I am. From what I can see, the code is
fine as is, but would be erroneous if an EXTERNAL statement or interface
body were added. Did you miss the fact that other_sub is not external,
but is instead a module procedure in the same module.
Yes, I misread his example. I thought other_sub was an
external procedure.
Bob Corbett
.
- References:
- Passing module procedures to external procedures -- type issues
- From: Rich Townsend
- Re: Passing module procedures to external procedures -- type issues
- From: robert . corbett
- Re: Passing module procedures to external procedures -- type issues
- From: Richard Maine
- Passing module procedures to external procedures -- type issues
- Prev by Date: Re: Scope of implicit none
- Next by Date: Compilation order (USE assocs)
- Previous by thread: Re: Passing module procedures to external procedures -- type issues
- Next by thread: Re: Passing module procedures to external procedures -- type issues
- Index(es):
Relevant Pages
|