Bill
>From: Bill Long <[log in to unmask]>
>
>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.
This is a "module procedure interface body".
>
>> 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.
Then 1 compiler accepts the code and 2 others reject with:
1) Error: F2008: C1210 IMPORT statement at (1) is not permitted in a module procedure interface body
(I cannot find this constraint in F2018 though)
2) error #6119: IMPORT statement is not allowed in a separate module procedure interface.
Anton
|