Van Snyder writes:
>
> Suppose I have an optional dummy argument without the POINTER attribute.
> Suppose the associated actual argument has the POINTER attribute.
>
> Would it introduce an incompatibility between Fortran 95 and some future
> edition of Fortran to interpret the dummy argument as being not present if
> the actual argument is present but not associated?
Yes. It is now perfectly legal to pass a disassociated pointer as an
actual argument to an optional pointer dummy argument. And the
standard specifies that PRESENT() will return true in such a case.
Standard-conforming programs are allowed to count on this. With this
change, PRESENT() would return false, which could cause previously
standard-conforming programs to fail. That's pretty unambiguously an
incompatability.
Whether the incompatability would cause problems for a significant
number of actual programs is probably more arguable. I don't have a
definitive answer for that one.
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|