(j3.2006) Interface body question
Bill Long
longb
Fri Oct 23 23:56:58 EDT 2009
Van Snyder wrote:
> [09-007r3:281:29-31 12.4.3.2p6] says
>
> An interface body specifies all of the characteristics of the
> explicit specific interface or abstract interface. The
> specifiation part of an interface body may specify attributes or
> define values for data entities that do not determine
> characteristics of the procedure. Such specifications have no
> effect.
I assume the intent is "have no effect on the characteristics of the
interface".
>
> This has been around forever.
>
> All the compilers I met rejected the following sort of thing
>
> interface
> subroutine sub ( A )
> real :: A
> integer :: J, I(J)
I bet that if you replace the statement above with:
in%#**$)@ :: hwon*((]]]]
you will get a compile error as well. Might be legal TECO (I'm not
sure), but as a Fortran statement it fails to conform.
I think we also require that statements in dead code regions still be
valid statements, even though they have no effect on execution of the
program.
Cheers,
Bill
> character(*) :: C
> end subroutine sub
> end interface
>
> because a statement is missing
> parameter ( J=3, C="xyz" )
>
> Must the declarations that have no effect satisfy the constraints that
> would be relevant if they were to have an effect?
>
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the J3
mailing list