Re: Passing module procedures to external procedures -- type issues

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


subroutine main_sub ()

call internal_sub()


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
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