|
Re: arrays within structures [message #14994 is a reply to message #14932] |
Tue, 13 April 1999 00:00  |
Vapuser
Messages: 63 Registered: November 1998
|
Member |
|
|
Waleed <114566.43@CompuServe.COM> writes:
> Hello again.
>
> Is it possible to reduce the size of an array within a structure?
>
> thanks
>
> Waleed
>
> --
>
No, if you're using named structures.
If you use anonymous structures, you may define a new structure with
a reduced array in it and copy all the fields over, as in...
a={a:1,b:2.,c:findgen(100)}
a1={a:a.a,b:a.b,f:a.c[0:49] }
If you're using idl 5.x, it's better to use pointers, as in...
a= {a:0, b:0, c:ptr_new(findgen(100),/no_copy)}
*a.c = bindgen(1000)
--
William Daffer
vapuser@catspaw.jpl.nasa.gov
|
|
|