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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Assigning structure tag names from variables? [message #42998] Mon, 14 March 2005 11:52 Go to next message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Jonathan Greenberg wrote:
> Is there any way to use a variable as the name of a structure tag?

How about the function CREATE_STRUCT()?
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 next 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
Re: Assigning structure tag names from variables? [message #43147 is a reply to message #42998] Mon, 14 March 2005 11:59 Go to previous message
Jonathan Greenberg is currently offline  Jonathan Greenberg
Messages: 91
Registered: November 2002
Member
What the hell would I do without this mailing list? Probably spend 3 days
bonking my head against a wall... Thanks again, guys!

--j


On 3/14/05 11:52 AM, in article 4235eb7c$1_2@marge.ic.sunysb.edu, "Benjamin
Hornberger" <benjamin.hornberger@stonybrook.edu> wrote:

> Jonathan Greenberg wrote:
>> Is there any way to use a variable as the name of a structure tag?
>
> How about the function CREATE_STRUCT()?
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Apr 08 03:31:19 PDT 2026

Total time taken to generate the page: 0.54698 seconds