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

Home » Public Forums » archive » Re: Assigning structure tag names from variables?
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: Assigning structure tag names from variables? [message #42999 is a reply to message #42998] Mon, 14 March 2005 11:51 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Jonathan Greenberg wrote:
> Is there any way to use a variable as the name of a structure tag? For
> instance:
>
> tagnamevar='mytagname'
> somedata=1.2
> structurename={tagnamevar:somedata}
> print,tag_names(structurename)
>
> Returns, as you IDL'ers know,
> TAGNAMEVAR and not MYTAGNAME

You can specify a structure name via a variable using the CREATE_STRUCT() function, but I
don't know how you'd use automatic structure definitions though (you'd still need a
routine mytagname__define). Maybe using the EXECUTE function?

paulv

--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: sending roi's to iTools
Next Topic: Assigning structure tag names from variables?

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

Current Time: Sun Apr 26 18:11:57 PDT 2026

Total time taken to generate the page: 1.04335 seconds