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

Home » Public Forums » archive » Re: Array structure--in a structure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Array structure--in a structure [message #22291 is a reply to message #22280] Thu, 02 November 2000 15:17 Go to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Marianne wrote:
>
> I want to define a structure containing arrays of structures. Is this
> possible without using pointers?
>
> E.g..
>
> tmp1={AA,a:1,b:2}
> tmp2={BB,CC:AA(12)}
>
> I realize this is not correct code, but what is?

tmp2={BB,CC:replicate({AA,a:1,b:2},12)}

then you can do

tmp2.cc.a=findgen(12)

etc. But you'd better hope you don't later want 11 or 13 AA's, because
without pointers, you're stuck.

JD

--
J.D. Smith | WORK: (607) 255-6263
Cornell Dept. of Astronomy | (607) 255-5842
304 Space Sciences Bldg. | FAX: (607) 255-5875
Ithaca, NY 14853 |
[Message index]
 
Read Message
Read Message
Previous Topic: Re: IDL 5.4 HDF library
Next Topic: Re: MESH_DECIMATE anyone?

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

Current Time: Sat Oct 11 11:15:14 PDT 2025

Total time taken to generate the page: 0.88074 seconds