Daun Jaun
4/12/2005 7:13:00 AM
statArr=[]
for i in 0...3
statArr[i]=[]
for j in 0...3
statArr[i][j]=[]
for k in 0...2
statArr[i][j][k]=0
end
end
end
p statArr
statArr[0][2][1]+=3
statArr[1][0][0]+=2
statArr[2][2][1]+=1
p statArr
statArr=Array.new(3,Array.new(3,Array.new(2,0)))
p statArr
statArr[0][2][1]+=3
statArr[1][0][0]+=2
statArr[2][2][1]+=1
p statArr
what is going on in the above code why is there the discrepancy in the output
is it a bug or paraller processing feature
please figure it out and explain