(j3.2006) IMPORT, C894

erik at forcheck.nl erik
Sat May 6 04:56:51 EDT 2017


Thanks Malcolm,

This is how I guessed it should be read.
Please change the wording of C894 as you suggested.

Erik

Erik Kruyt
Forcheck b.v.

> -----Oorspronkelijk bericht-----
> Van: j3-bounces at mailman.j3-fortran.org [mailto:j3-bounces at mailman.j3-
> fortran.org] Namens Malcolm Cohen
> Verzonden: donderdag 4 mei 2017 03:04
> Aan: fortran standards email list for J3 <j3 at mailman.j3-fortran.org>
> Onderwerp: Re: (j3.2006) IMPORT, C894
> 
> Erik Kruyt writes:
> <<<
> I am puzzled about C894. Is the following code not standard conforming?
> 
> module mod
>   integer i
>   interface
>     subroutine sub
>       import
>     end subroutine sub
>   end interface
> end module mod
> >>>
> 
> It is certainly intended to be.
> 
> <<<
> According to R504, R507, R508 the interface belongs to the
specification-part
> of the module.
> 
> In Fortran 2008 this constraint was not present.
> >>>
> 
> In Fortran 2008 this constraint was worded differently:
> 
> C1210 (R1209) The IMPORT statement is allowed only in an interface-body
> that is not a module procedure interface body.
> 
> <<<
> Why is this introduced?
> >>>
> 
> Because F2015 has extended the IMPORT statement, and now allows it to
> appear in many places forbidden by F2008.
> 
> Reviewing C894:
> "C894 (R867) An IMPORT statement shall not appear in the
specification-part
> of a main-program, external subprogram, module, or block-data."
> 
> Perhaps this should be changed to say "scoping unit" instead of
> "specification-part".  Or an exception added ", except that it may appear
in
> an interface-body".
> 
> Cheers,
> --
> .............................Malcolm.
> 
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3





More information about the J3 mailing list