At 11:19 09-03-2004 +0000, you wrote:
>Malcolm Cohen wrote:
>>John Reid said:
>>
>>>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."
>>
>>
>>Sorry, but this reasoning is incorrect. (Just as well, because it would
>>have outlawed ALL data-implied-do subscripting!).
>
>Yup! I did not read the bnf carefully enough. I was in the company of at least
>two compiler vendors who thought the example was invalid!
>
>John Reid.
I tried it on 3 different compilers and all accept the program without
complaints.
(Wich is not nessesarily proof of standard conformance of course). :-)
\---
Best regards,
Jan van Oosterwijk | "They that can give up essential liberty
Netherlands | to obtain a little temporary safety deserve
| neither liberty nor safety."
| -- Benjamin Franklin (1759)
write(*,*)transfer((/778985834,1869504886,1702130543,1785296754 &
&,1635205227,1868849518,1819160175 /),(/'x'/)) ; end
mailto:Jan<dot>vanOosterwijk<at>wanadoo<dot>NL
http://huizen<dot>dto<dot>tudelft<dot>nl/vanOosterwijk/
|