This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Is this valid ?
Tobias Burnus wrote:
> Tobias Burnus wrote:
>> I'll try to find it later in the standard.
>>
> I was too lazy, but the following thread contains the answer (I believe):
>
> http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/e6544d95091d8ee5/
>
>
> The essential part is that "1" and a PARAMETER are not definable. If
> one uses INTENT(OUT) or INTENT(INOUT), gfortran gives an error:
>
> Error: Actual argument at (1) must be definable as the dummy argument
> 'x' is INTENT = OUT/INOUT
>
> If one does not use INTENT (e.g. because there is no explicit
> interface), the compiler cannot easily check it, but it is still wrong.
>
Thanks
I didn't find the exact sentence I was looking for in the standard, but
as you, the thread you pointed out, and other clf threads as well agree,
I can reasonably believe it.
It's not the first time I'm trapped by my C habits. :-(
But It was a good opportunity to improve my knowledge of the standard :-).
Mikael