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

Home » Public Forums » archive » Re: redout of "name", "type" and "value" tags into a string
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: redout of "name", "type" and "value" tags into a string [message #54119 is a reply to message #54118] Mon, 21 May 2007 07:06 Go to previous message
ben.bighair is currently offline  ben.bighair
Messages: 221
Registered: April 2007
Senior Member
On May 21, 5:03 am, BavarianMike86 <jo.mich...@gmx.de> wrote:
> Hello!
> I hope you can help me:
>
> I have a structure. I can redout and print the structure tags using
> the TAG_NAMES function.
> But I also want to readout the "Type" and "Value" tags into a string
> array.
> How can I do that?
>

Hi,

Getting the type names isn't too hard. You could wrap the follwoing
into a function.

IDL> n = n_tags(!X)
IDL> s = STRARR(n)
IDL> for i =0,n-1 do s[i]=SIZE(!X.(i),/TNAME)
IDL> print, s

But getting the value is not straight forward as a structure field
could be quite complex, like a pointer, object or another structure.
Besides, that is really what the "." operator does for you, it returns
the value of the field. Like...

print, !X.range

Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: OT: recommendations for high preformance workstations
Next Topic: Re: idlwave and emacs "empty input ring"

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

Current Time: Sun Oct 12 14:51:35 PDT 2025

Total time taken to generate the page: 0.95998 seconds