comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » arrays within structures
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
arrays within structures [message #14932] Mon, 12 April 1999 00:00 Go to next message
Waleed is currently offline  Waleed
Messages: 9
Registered: March 1999
Junior Member
Hello again.

Is it possible to reduce the size of an array within a structure?

thanks

Waleed

--

Re: arrays within structures [message #14994 is a reply to message #14932] Tue, 13 April 1999 00:00 Go to previous message
Vapuser is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Stupid Question#1
Next Topic: Read ".mat" files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:03:05 PDT 2025

Total time taken to generate the page: 0.37594 seconds