I happened to make a mistake in defining a set of abstract interfaces
and one compiler
that I use chokes on it, whereas another accepts it without any fuss.
Looking more
closely I found the error - the interface "compute_routine" refers to
itself and I wanted
a different interface. However, I wonder if this is at all legal.
Here is the code in question (just the essential part):
module computation_data
implicit none
type computation_method
character(len=40) ::
name
procedure(compute_routine), pointer, nopass :: compute
end type
abstract interface
subroutine compute_routine( param_value, zfunc, probability )
real, dimension(:), intent(in) :: param_value
procedure(compute_routine) :: zfunc
real, intent(in) :: probability
end subroutine
end interface
end module computation_data
Regards,
Arjen
The abstract interface shown is standard conforming. The name
compute_routine has not been declared before its use in the
PROCEDURE statement, but the Fortran standard does not require
it to be declared before such a use. If the name compute_routine
had itself been declared by a PROCEDURE statement, that
declaration would be required to appear before the use of the
name.
Bob Corbett