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

Re: Frustrating array in structure. Please help



David Fanning wrote:
> 
> Pointers, my man, pointers! :-)
> 
>  new = {FID, Var1:0.0, data:Ptr_New()}
> 
> Later:
> 
>    If Ptr_Valid(new.data) THEN *new.data = mydata ELSE $
>       new.data = Ptr_New(mydata)

Or,

new = {FID, Var1:0.0, data:Ptr_New(/allocate)}
*new.data = mydata

Cheers,
Pavel