Interface bodies are separate scoping units. This allows names of dummy arguments (for example) to not conflict with names in the surrounding host. Insert an IMPORT statement to bring iarr into the interface.
> On Mar 8, 2018, at 10:06 AM, Anton Shterenlikht <[log in to unmask]> wrote:
>
> module m
> implicit none
> integer, parameter :: iarr = selected_int_kind( 8 )
> interface
> integer( kind=iarr ) module function f( space )
import iarr ! Add this statement and the compilers should accept the code.
> ! module function f( space )
> integer( kind=iarr ), intent(in), allocatable :: space(:,:,:) [:,:,:]
> ! integer( kind=iarr ) :: f
> end function f
> end interface
> end module m
Cheers,
Bill
Bill Long [log in to unmask]
Principal Engineer, Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9143
Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
|