[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: brain twister



Well, try this. I think it is doing exactly what you expect given that A
is passed by reference, no matter how bizarre it looks.

.comp
pro test1, x, y
  x[2] = 10.
  print, y
end

a = findgen(10)
print, a
test1, a, a

X and Y are "pointers" to the same array A.
Cheers,
Pavel