At 12:03 17-10-02 -0400, Jean Vezina wrote:
>To all:
>
>I have this example code:
>
> character*10 a
> a = '1234567890'
> forall(i=1:10) a(i:i) = a(11-i:11-i)
> print *,a
> end
>
>Is this standard conforming ? More exactly, are
>character substrings allowed in a FORALL statement ?
I think it is standard conforming; but ...
Two compilers give different results:
The first gives the following:
E:\Fortran\Test>f95 vezina.f95
1636 warning on line 6 of vezina.f95: This assignment may violate the
many-to-one assignment restriction of the FORALL.
0 Errors, 1 Warnings, 0 Other messages, 0 ANSI
E:\Fortran\Test>vezina
0987667890
The other gives:
E:\Fortran\Test>ftn95 vezina.f95 -lin
NO ERRORS [<VV> FTN95/Win32 v2.52p]
Creating executable: vezina.EXE
E:\Fortran\Test>vezina
0987654321
So my question now is: Which compiler is standard conforming?
Best regards,
\---
Jan van Oosterwijk
Netherlands
mailto:Jan.vanOosterwijk<at>DTO.TUDelft.NL
http://huizen.dto . tudelft.nl/vanOosterwijk/
|