Phillip Helbig writes:
> > > real, parameter :: aa(6)=(/1,2,3,4,5,6/)
> Isn't the use of non-real constants in the array constructor also in
> violation of the standard?
No. Why would it be? Looks like a perfectly fine array constructor
to me. You aren't perhaps looking at anything to the left of the "="
in making your statement are you? :-)
Remember that evaluation of such things does *NOT* depend on context.
So don't look at the context. Just look at the constructor. Its a
perfectly ordinary integer array constructor.
And its also legal to assign an integer value to a real (yes, even in
a parameter initialization). The compiler will do the conversion.
Being an array doesn't change this.
Now a constructor with mixed integers and reals would be illegal,
but that's not what we have here.
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|