> On Sep 19, 6:52 pm, Rich Townsend barVOIDtol.udel.edu> wrote:
>
>
>
>> 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?
>
> 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.
BTW, your code would be standard-conforming if you
removed the IMPLICIT NONE statement, but it might not
do what you expect.
Bob Corbett