Error with host association and IMPLICIT NONE

Arjen Markus arjen.markus@wldelft.nl
Mon Sep 22 08:44:00 GMT 2008


Hello,

as illustrated by the following code, gfortran inadvertently extends the 
scope
of an IMPLICIT NONE statement to interface blocks:

! impnone.f90 --
!     Check the scope of implicit none
!
module x
    implicit none

contains
subroutine integrate( f, x1, x2, value )
    real :: x1, x2, value
    interface
        function f(x)
            real :: x
        end function f
    end interface

    ! Do something useful
end subroutine
end module x

As discussed in 
http://groups.google.com/group/comp.lang.fortran/browse_frm/thread/b2f031931dbc3ad1
the interface block should behave such that the function f gets the 
implicit type real.

Regards,

Arjen



More information about the Fortran mailing list