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

Home » Public Forums » archive » [Q] extracting value from 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: [Q] extracting value from a structure ... [message #12923 is a reply to message #12793] Fri, 11 September 1998 00:00 Go to previous message
Imanol Echave is currently offline  Imanol Echave
Messages: 26
Registered: May 1998
Junior Member
What do you think about this?

----------------------------------------------
struct={NAME:'Imanol',AGE:24}
field='AGE'

index=(WHERE(field EQ TAG_NAMES(struct)))[0]
value=struct.(index)
PRINT,field+'=',value
----------------------------------------------

NOTE: TAG_NAMES returns the names ALWAYS ON UPPERCASE. If you do field='age' the
program will not work.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: xwindows colour issues
Next Topic: call_external won't release dll

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

Current Time: Sun Oct 12 10:44:03 PDT 2025

Total time taken to generate the page: 0.32028 seconds