compilation problem with module function interface definition



Other than lack of fortran95/03 knowledge, what other cardinal rule of the modern fortran language is the following snippet breaking?

The module compiles cleanly with the interface block commented out. If I include it, ifort complains about type (foo) not being defined.

Thanks,

Mirko

MODULE func_intrfc_test

![module_header_comments]
  type foo
     logical flag
     real number
     integer counter
  end type foo

!!$INTERFACE test_generic
!!$   real FUNCTION test_particular(obj,arg) RESULT(result)
!!$     type(foo) obj
!!$     real,intent(in)::arg
!!$   end FUNCTION test_particular
!!$END INTERFACE

CONTAINS
  real FUNCTION test_particular(obj,arg) RESULT(result)
    type(foo) obj
    real,intent(in)::arg

    result=arg+2.
  END FUNCTION test_particular

END MODULE func_intrfc_test

.



Relevant Pages