Scope of implicit none



Hello,

I have a question about the scope (if that is the proper name) of an
IMPLICIT NONE.
The following program causes an error message with gfortran, but not
with g95 or ifort:

! 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

The error message with gfortran is that the function f has no IMPLICIT
type.
That seems to indicate that the IMPLICIT NONE statement is active in
for the
interface block too. As the other two compilers do not complain about
it, I
assume that they do not let this IMPLICIT NONE statement make itself
felt
inside an interface block.

Which is the right interpretation? (If there is a right
interpretation)

Regards,

Arjen
.



Relevant Pages

  • Re: using iso_c_binding
    ... IMPLICIT NONE ... Unexpected data declaration statement in INTERFACE block at ... Fatal Error: Can't open module file 'ftn_c.mod' for reading at: No ...
    (comp.lang.fortran)
  • Re: iostat usage
    ... implicit none ... integer:: ierror ... there is no error message when writing to the existed file? ... on the compiler, but all compilers that I know open a file with a name ...
    (comp.lang.fortran)
  • Re: setting of private variables
    ... But why doesn't compiler pick up the errors of private variables used ... Which is exactly why Jugoslav mentioned IMPLICIT NONE. ... you would get an error message. ... then they wouldn't need declaring in the main ...
    (comp.lang.fortran)
  • Re: iostat usage
    ... implicit none ... integer:: ierror ... there is no error message when writing to the existed file? ... on the compiler, but all compilers that I know open a file with a name ...
    (comp.lang.fortran)
  • automatic arrays with negative size in g95 and gfortran
    ... implicit none ... For iiequaling -1, gfortran crashes. ... If g95 does, I would prefer that gfortran emulate it in this case. ... which works for both compilers. ...
    (comp.lang.fortran)