(j3.2006) ASSOCIATED
Bill Long
longb at cray.com
Fri Mar 12 11:38:10 EST 2010
Robert Corbett wrote:
>
> I see now that fixing the specifications of the intrinsic functions is
> going to be a lot of fun.
>
> I do not think that the authors of the standard intended it to be
> impossible for cases (vi) or (vii) to occur. Under your interpretation,
> the program
>
> PROGRAM MAIN
> POINTER P, Q
> REAL X
> TARGET X
> P => X
> NULLIFY(Q)
> PRINT *, ASSOCIATED(P, Q)
> END
>
> should print " T" because P is associated and Q, which is argument
> associated with the dummy argument TARGET of ASSOCIATED, is not
> associated and therefore the dummy argument TARGET is "not present."
> I just compiled and ran that program using three different compilers.
> All three runs printed " F".
>
Nice example. I tried 5 compilers and got F:5, T:0. And I believe this
is what is intended. ASSOCIATED looks like a case where we need to have
2 forms and not identify the TARGET argument as optional.
Cheers,
Bill
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101
More information about the J3
mailing list