(j3.2006) a question on interp F08/0049
Malcolm Cohen
malcolm
Mon Nov 15 19:12:56 EST 2010
Aleks Donev wrote:
>On 11/15/10 03:26, Malcolm Cohen wrote:
>> Don't confuse this with the COELEMENTAL attribute! Of course coelemental
>> functions cannot have variable type parameters at this time.
>If Malcolm meant this as a joke
Yes. An obviously horrible idea.
Jim Xia wrote:
> the original wording in F08 seems to prevent this on purpose.
That's not an accurate characterisation of what happened here. The so-called
original wording was not "originally" in F2008 but was put there by the flawed
answer to interp F03/0119, see F08/0049 which begins
"Interpretation F03/0119, which became part of the Fortran 2008 standard, ..."
followed by an explanation of why F03/0119 is flawed.
> I'd not be surprised to see a further interp trying to reverse this interp
> answer again.
F08/0049 does not "reverse" F03/0119!
The edit in F08/0049 does effectively replace the edit in F03/0119, but please
note that the problematic example in F03/0119, viz example3, which F03/0119 says
"was intended to be prohibited", remains prohibited by F08/0049. (And example1
remains conforming, and example2 was already permitted in Fortran 2008 and
remains permitted by F08/0049.)
You can call it a "partial reversal" if you like - but to the extent that it is
a reversal, it is a reversal of a case that was not considered by F03/0119, i.e.
an unfortunate consequence of the edits but without any justification in
F03/0119 for that effect. The justification in F03/0119 is that we did not
intend to allow "elemental functions to produce arrays whose elements have
different length type parameters", and F08/0049 agrees with that justification.
You can certainly doubt that we yet have the wording right, since we got it
wrong in F03/0119, but we absolutely did not intend to introduce an
incompatibility with Fortran 95.
Cheers,
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list