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

Home » Public Forums » archive » Indexing structures of different type
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: Indexing structures of different type [message #16106 is a reply to message #15921] Mon, 28 June 1999 00:00 Go to previous message
Pavel Romashkin is currently offline  Pavel Romashkin
Messages: 166
Registered: April 1999
Senior Member
Structure fields can be indexed similarly to arrays. Use syntax similar
to:

for i=0, n_elements(tag_names(My_struct))-1 do help, My_struct.(i), /struct

This will step through all sub-structures in My_struct. Notice that you
MUST use parenthesis, not [ ] brackets, when indexing structures.
Cheers,
Pavel

Donglai Gong Rm3110 x1569 wrote:

> Hi, does anyone know how to index structures of different types in IDL?
>
> REPLICATE won't work since it creates an array of the same structure, so
> I'm thinking of doing a structure of structures. However I don't know
> how to index them for use in a loop. Thanks in advance.
>
> Donglai Gong
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Passing info and destroying widgets...
Next Topic: Crazy use of MAX function.

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

Current Time: Sat Oct 11 15:23:21 PDT 2025

Total time taken to generate the page: 0.08343 seconds