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

Home » Public Forums » archive » IDL_Savefile use
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
IDL_Savefile use [message #79703] Wed, 28 March 2012 09:26 Go to previous message
desertdryad is currently offline  desertdryad
Messages: 39
Registered: August 2011
Member
I am trying to use the IDL_Savefile class within a procedure, which
needs to restore structure variables that I've previously saved to
file using 'SAVE'. This works fine - to a point. I can restore the
variable, but I can't figure out how to programmatically reference the
variable I've just restored!

Here is a bit of code :

sObj = OBJ_NEW('IDL_Savefile', structurefile)
sinfo = sObj->Contents()
print, 'struct contents are :', sinfo
sName = sObj->Names()
print, 'saved structures name is :', sName

RESTORE, sName, /VERBOSE

.. which all does what I expect, but I afterwards want to reference
the structure variable that is contained as a strong in 'SName'. How
I do that? Ie, the below does not work:

tag_idx = WHERE(TAG_NAMES(sName) EQ STRUPCASE(thevariable), count)

because 'sName' is a string containing the name of my structure not
the variable itself. How can I programmatically get at the variable,
without passing the name to the procedure? (which to me defeats the
purpose of Names() altogether) I must be missing something incredibly
simple... which would be easy, since I'm not terribly good at object
based programming in IDL.

thanks,
Cyndy
[Message index]
 
Read Message
Read Message
Previous Topic: IDL and PV wave language free
Next Topic: Re: plot colored ellipses

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

Current Time: Wed Oct 08 14:10:23 PDT 2025

Total time taken to generate the page: 0.00230 seconds