Print

Print


Hello,

At 00:32 07-12-02 -0500, Jean Vezina wrote:


>To all:
>
>I have the following program:
>
>module test
>    integer ::x(4)
>end module
>use test,y=>x
>namelist /a/y
>y=(/1,2,3,4/)
>write(*,nml=a)
>end
>
>1- Is it standard conforming ?
>
>I also tested the code using two compilers:
>
>The first compiler gives the following result
>
>  &A
>  Y       =           1,           2,           3,           4
>  /
>
>The second:
>
>  &A
>  X=           1,           2,           3,           4
>  /
>
>The difference between the two is that the first one
>uses the local name as the namelist variable name while
>the second retains the original name. Which is correct ?
>
>Jean Vezina

IMHO the program is correct, but name X should be unknown in the
program, so the second compiler is not correct.

I have the same experience:

One (Absoft) gives X = 1, 2, 3, 4

Another (Salford):  Y =   1    2    3    4


Best regards,

\---

Jan van Oosterwijk
Netherlands
mailto:Jan.vanOosterwijk<at>DTO.TUDelft.NL
http://huizen.dto . tudelft.nl/vanOosterwijk/