tychan@bradley.UUCP (05/06/88)
I got this f77 compiler of some distribution tape for a 3b1, when ever the
common statement is used, there seem to be an error in the offset as shown by
the following example.
The output should be 1 2 3 4 for all writes as oppose to the second wrong
output.
Any suggestion for a fix.
Thanks
T. Y. Chan
-----------------------------------------
labUNIXPC [!] $ cat wrong.f
integer x(4),y
common /ty/ y,x
x(1) = 1
x(2) = 2
x(3) = 3
x(4) = 4
y =10
write (6,10) (x(j),j=1,4)
call rou(x)
write (6,10) (x(j),j=1,4)
10 format (10(I2))
stop
end
subroutine rou(jx)
integer jx(4)
write (6,10) (jx(j),j=1,4)
10 format (10(I2))
return
end
labUNIXPC [!] $ wrong
1 2 3 4
10 1 2 3
1 2 3 4
labUNIXPC [!] $