Pointer Type Question [message #46506] |
Sun, 27 November 2005 01:25 |
IDLmastertobe
Messages: 54 Registered: June 2004
|
Member |
|
|
I am implementing something that can keep a copy of original data and reuse
the original data later on.
if(size(ydata, /n_dimensions) eq 3) then begin
if(!firsty eq 1) then begin
*yarr = ydata
!firsty=0
endif
ydata = smooth(*yarr, [1, !smo, !smo])
oyimage->SetProperty, data = ydata
endif
ydata has the original data I want to keep. After the first iteration,
ydata will be overwritten. Therefore, I am tyring to get ydata to be
copied by *yarr in the first iteration and afterwards I will "reload"
*yarr into ydata so that the original data will be used every time. since
I have no information in advance about the size of the ydata, I am using a
dynamic variable that can copy ydata regardless type and size. I am using
pointer, and I declare the *yarr point in a function that calls the above
procedure as follows:
yarr = ptr_new(/allocate_heap)
but i get a error message "Pointer type required in this context: YARR."
Does anyone know why? Thank you for your time.
|
|
|