(j3.2006) [Re: Interp 64 question]
Van Snyder
van.snyder
Fri Jan 12 15:13:06 EST 2007
> Consider the module
>
> module procedure_pointers_05_m
> type x
> integer a
> procedure(sub1),pointer,pass(passed)::ptr1
> procedure(sub2),pointer,pass(passed)::ptr2
> procedure(sub2),pointer,pass::ptr3
> endtype
>
> interface
> subroutine sub1(a,passed)
> import :: x
> integer a
> type(x) :: passed
> endsubroutine
>
> subroutine sub2(passed,a)
> import :: x
> integer a
> type(x) :: passed
> endsubroutine
> endinterface
> endmodule
>
>
> If I read the current state of interp 64 (not yet passed) it seems the
> above is not conforming because the interfaces come after their use in
> the definition of type X. But the interfaces use type X. Is this
> really what we intended?
I hope we intend that one can put either the type or the interface first
if they depend upon each other.
Although types and interfaces depending upon each other is new in
Fortran 2003, compilers already have to do lots of calculations on
graphs, and they're already not all DAGs, so this one should not cause
any new conceptual difficulty.
More information about the J3
mailing list