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

Home » Public Forums » archive » Renaming a variable in IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Renaming a variable in IDL? [message #55507] Fri, 24 August 2007 00:28
peterberg79 is currently offline  peterberg79
Messages: 2
Registered: August 2007
Junior Member
Hi,
I am writing a procedure for autmatically saving some variables from
more advanced programs for easy access later on. Something along the
lines of:

PRO, SAVPRO, XVAR, Fname
save, XVAR, filename=Fname
end

So if I want to save the file 'YVAR' to filename 'YVAR.sav' I would
call:
SAVPRO, YVAR, 'YVAR.sav'
The problem is that in the save file the variable would be called XVAR
instead of YVAR, which is a problem for me.
I realized that I can retrieve the original varaible name as a string
and include it to the SAVPRO call. But then I got lost on how to
rename a variable to a string name. I was thinking there might be
soemthing along the lines of using echo in unix (echo
$STRYVAR'=XVAR'), but I have found no such function.

My question is: Is it possible to rename a variable in IDL
automatically? Or is there a better way to do all this?
[Message index]
 
Read Message
Previous Topic: Re: reading envi file in IDL
Next Topic: Re: read_ascii for more than one file

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

Current Time: Wed Oct 08 17:36:14 PDT 2025

Total time taken to generate the page: 0.00467 seconds