On Sep 14, 2004, at 2:19 PM, Aleksandar Donev wrote:
> Richard E Maine wrote:
[about allowing character length disagreement in some
situations in argument passing]
>> Be aware that it is a special case.
> Yes, I am aware of the thorny history. Is this also in F95?
Yes. And in f77, which is where it originally comes from. As far
as I know, the main (or even only?) reason the feature exists in
f90 and onwards is for f77 compatibility. It doesn't really fit well
with the rest of the new procedure interface stuff in f90, so it
remains as just a strange wart of a special case. (Which is probably
the main answer to your other question about why it was so
limited - it is a special case and doesn't generalize well, so it
wasn't generalized at all.)
> Just to clarify though: If the dummy is LEN=1 in a generic, and you try
> to call the generic with a LEN=3 actual, should generic resolution
> work? At least one compiler does not think so, but the ones I trust
> seem to think so.
I think so, but
1. I hate digging into the sections most relevant to this. I find them
among the hardest-to-read sections of the standard. So I didn't
dig real deep. At a fairly quick skim, I didn't see anything that
should disallow this, but I won't swear that I didn't overlook
anything.
2. Just because it should work doesn't mean I'd do it. :-(
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|