I am using a parameter to fix the precision of the used types. This works fine until I try to use the same type within an interface. Consider this small example:
The easiest way is to add import
inside the interface. It is somewhat of a misdesign that the definitions of the module are outside the scope of the interface. Plain import
will import everything.
....
subroutine dosomething(fun)
real(K) :: foo
interface
function fun(bar)
import
real(K) :: bar
real(K) :: fun
end function fun
end interface
end subroutine
....
Also possible: import :: K