Passing module procedures to external procedures -- type issues
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Passing module procedures to external procedures -- type issues         

Group: comp.lang.fortran · Group Profile
Author: Rich Townsend
Date: Sep 19, 2008 18:52

Hi all --

Consider the following module:

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

(FYI, this is a cut-down version of a more extended code; the external
subroutine QAG, for which an explicit interface is *not* defined, is part of
QUADPACK).

This compiles fine with Intel Fortran (Linux), but on gfortran 4.3.1, I get the
following error:

foo.f90:15.24:

call QAG(other_sub)
1
Error: Symbol 'other_sub' at (1) has no IMPLICIT type

I don't really understand what this error message means; surely, the other_sub
name uniquely identifies a subroutine throughout the whole module? Is my code
standard conforming or not?

Many thanks,

Rich
12 Comments
diggit! del.icio.us! reddit!