> I assume you are looking at one of the f2k drafts, since there isn't
> any section 16 in f90 or f95. Note that in quoting from f2k drafts,
> one needs to specify which dfaft, because it is still changing.
Oops. Yes. It was a f2k draft I was looking at by mistake: CD version, ISO/IEC
1539-1 September 2002.
> The compiler is not required to detect the errors. In some cases,
> most compilers almost certainly will not catch the errors. In this
> case, with the subroutine in question being an internal one, the
> compiler does at least have a reasonable chance of diagnosing it, but
> is not required to. (And the vendor has a pretty obvious cost/benefit
> tradeoff in terms of whether it is worth the development effort to
> catch the cases like this vs the question of what fraction of user
> errors this actually will find).
Yeah, you are right. It is a pretty odd case. I'm not surprised the compiler
didn't pick it up.
Given that the subroutine call is invalid for the reasons you described, I am
more surprised at the fact that the program didn't crash and that it also
behaved in the way that I hoped might be the correct way when there was wasn't
actually one.
Thanks for the clear answer.
Paul
|