(j3.2006) request for interpretation
Robert Corbett
Robert.Corbett
Sat Mar 29 08:28:34 EDT 2008
Robert Corbett wrote:
> Consider the following program
>
> MODULE M1
> INTERFACE SUBR
> MODULE PROCEDURE SUBR1
> END INTERFACE
> CONTAINS
> SUBROUTINE SUBR1
> END SUBROUTINE
> END
>
> MODULE M2
> INTERFACE SUBR
> MODULE PROCEDURE SUBR2
> END INTERFACE
> CONTAINS
> SUBROUTINE SUBR2
> END SUBROUTINE
> END
>
> PROGRAM MAIN
> USE M1
> CALL S
> CONTAINS
> SUBROUTINE S
> USE M2
> CALL SUBR
> END SUBROUTINE
> END
>
> Is this program standard conforming?
>
> The program appears to violate the restrictions set out
> in Section 16.2.3 of the Fortran 2003 standard. It has
> been argued that Section 12.4.4.1 of the Fortran 2003
> standard modifies the requirements of Section 16.2.3.
> While that might have been what was intended, I do not
> see how the text of Section 12.4.4.1 has any effect on
> the requirements of Section 16.2.3.
For the record, I believe that the committee intended that
programs such as the one above should be allowed. I don't
believe that Section 16.2.3 as it is currently written allows
them. Section 16.2.3 should be amended.
Bob Corbett
More information about the J3
mailing list