(j3.2006) Is this prohibited?
Malcolm Cohen
malcolm
Tue Jun 18 22:26:32 EDT 2013
> integer :: F(merge(2,3,present(a))) ! <--- This is where the objections
> occur
...
>It seems that 7.1.11p2(9)(b) together with 7.1.11p4(1) allow it.
I think that it is prohibited. I think all properties of an optional argument
are, in a sense, "deferred".
Ok, the standard does not say that, but neither does it say what kind of
property is being tested by PRESENT, so we are at best in the arena of "not
standardized".
Note that a similar reading of those two items would conclude that LEN(a) is
permitted ... and that clearly cannot be allowed.
Note further that applying the same reasoning to 7.1.12 concludes that
PRESENT(a) is a constant expression, and this is clearly nonsense.
>If it's prohibited, is there a good reason to retain the prohibition?
I think there is a reasonable argument for permitting PRESENT, and no other
non-constant enquiry intrinsic, of an optional dummy, in a specification
expression. OTOH I have a feeling that this question has been raised before
(not as an interp I think), and I thought we decided against it at the time...
At the very least we should clarify what the situation is supposed to be.
Cheers,
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list