Re: best way to find the variable name of a structure from RESTORE-ing a sav file [message #32195] |
Fri, 20 September 2002 10:00  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Robert Stockwell wrote:
> 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.
>
Dear Robert,
you should have a look at the Craig Markwardt library about restore.
cmrestore
You find it at http://astrog.physics.wisc.edu/~craigm/idl/idl.html
Reimar
>
> 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
>
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
|
|
|