| Assigning structure tag names from variables? [message #43000] |
Mon, 14 March 2005 11:39  |
Jonathan Greenberg
Messages: 91 Registered: November 2002
|
Member |
|
|
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
Thoughts?
--j
|
|
|
|
| Re: Assigning structure tag names from variables? [message #43146 is a reply to message #43000] |
Mon, 14 March 2005 12:14  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jonathan Greenberg writes:
> What the hell would I do without this mailing list? Probably spend 3 days
> bonking my head against a wall... Thanks again, guys!
It's faster than reading through the list of procedures
and functions, I have to admit, although I still
recommend you take a slow day and do the reading, too.
It truly is amazing what you find out. I try to do it
several times a year. :-)
Cheers,
David
P.S. I found an answer to a particularly vexing question
on my own web page this morning, so I guess I have to add
*that* to the reading schedule, too. :-(
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
|