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

Home » Public Forums » archive » work with 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
work with structures [message #73610] Wed, 17 November 2010 08:00
Jean[2] is currently offline  Jean[2]
Messages: 41
Registered: October 2010
Member
I have a program that takes a structure as one of its argument. I want
this program to parse and display its contains.

The structue may looks like this:

structure = { var1: {label:'label of var1', value:'value of var1'},$
var2: {label:'label of var2', value:'value of
var2'},$
... }

I'm not supposed to know in advance the name of var1. Using tag_names,
I was able to retrieve those names, but know I need to get the label
and value of each of them and this is where I'm stuck.

of course doing something like

list_var = tag_names(structure)
for i=0,n_tags(structure)-1 do begin
print, structure.list_var[i].label !!! not working
endfor

did not work !

Any idea how I can do that ?

Jean
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Good-bye Plot, Surface, Contour, TV and all the rest!
Next Topic: PostScript Background Color Preference

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

Current Time: Wed Oct 08 13:34:09 PDT 2025

Total time taken to generate the page: 0.00442 seconds