Jean Vezina wrote:
> To all:
>
> Before sending a bug report, I would like to know if the following
> example is standard conforming (Fortran 95):
>
> integer,parameter::v(3)=(/3,1,2/)
> real x(3)
> data (x(v(i)),i=1,3)/4.,6.,2./
> print *,x
> end
>
This is a tricky one that may call for an interpretation.
61:34-35 says:
"Constraint: In a variable that is a data-stmt-object, any subscript, section
subscript, substring starting point, and substring ending point shall be an
initialization expression."
So v(i) must be an initialization expression. Now look at the rules for
initialization expressions on page 94 and you find no mention of DATA
implied-DOs though array constructor implied-DOs are mentioned.
So (reluctantly) I come to the conclusion that your code does not conform to the
Standard.
Cheers,
John Reid.
|