best way to find the variable name of a structure from RESTORE-ing a sav file [message #32197] |
Fri, 20 September 2002 08:54 |
Robert Stockwell
Messages: 74 Registered: October 2001
|
Member |
|
|
anyone have good ideas on how to programatically find
the name of a variable in memory, that happens to be
a structure. The reason I don't know the name is that I
am restoring a structure from an IDL sav file. The structure
is the only thing in the sav file.
For instance, I am writing a function like:
function readsavdata, filename
restore,filename=filename
; here I have a structure in memory, with a variable name I do not know.
help
; next line is the result of the help command
; IDL> NWS_MMT_FCAST_TEMPERATURE_ARRAY STRUCT = -> <Anonymous> Array[950040]
return, ?????? ; i need the name of this structure
end ; end of function
How do I get this variable name "NWS_MMT_FCAST_TEMPERATURE_ARRAY" so I can
put in a line like
return,NWS_MMT_FCAST_TEMPERATURE_ARRAY
at the end of the function. I suppose I can capture and parse the help
command and issue an execute command, but there must be a way to find that info
that is a little nicer.
Cheers,
bob
|
|
|