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

Home » Public Forums » archive » SAVE
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
SAVE [message #70886] Thu, 13 May 2010 13:05 Go to next message
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
Hi there,

I'm running a procedure that has lines in it such as:

(Scope_VarFetch('data', LEVEL=1, /ENTER)) = 1

... that are used to save variables to the main IDL level. I'd like to
add a line at the end of this procedure to make it save all variables
that were created in a *.sav file. Something like this:

save, /variables, filename= '/Users/xxx/Desktop/example.sav'

... but it's not working. I'm getting in the *.sav file all other
variables defined in the procedure, but the ones created using
Scope_VarFetch. Any suggestions?

PS: if I run the procedure first (without the save line in it) and
then type the save line at the IDL prompt I get exactly what I want.
Just wanted to know if it's possible to automate this process.

Thank you!
Re: SAVE [message #70976 is a reply to message #70886] Tue, 18 May 2010 05:44 Go to previous message
jeanh is currently offline  jeanh
Messages: 79
Registered: November 2009
Member
On 17/05/2010 2:49 PM, fgg wrote:
> On May 14, 3:53 pm, jeanh
> <jghasb...@DELETETHIS.environmentalmodelers.ANDTHIS.com> wrote:
>>> One of the suggestions I
>>
>>> got was to include parameters in my procedure, define the variables
>>> within the procedure, and then call it specifying the parameters
>>> similarly on the command line. Something like this:
>>
>>> pro xxx, a=a, b=b, c=c
>>
>> as a matter of fact, a,b,c are keywords here. You can also simply do
>>
>> pro xxx, a,b,c
>>
>> Jean
>
>
> That's true. The advantage of using a=a,b=b,... is that I can easily
> change the name of the variables if I need to:
>
> IDL> xxx, a=a1, b=b1
> IDL> xxx, a=a2, b=b2
>
> Thank you.

:-) as in
xxx,a1,b1
xxx,a2,b2
?

Jean
PS: the true advantage of keywords is that they can be omitted
Re: SAVE [message #70982 is a reply to message #70886] Mon, 17 May 2010 11:49 Go to previous message
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
On May 14, 3:53 pm, jeanh
<jghasb...@DELETETHIS.environmentalmodelers.ANDTHIS.com> wrote:
>  >One of the suggestions I
>
>> got was to include parameters in my procedure, define the variables
>> within the procedure, and then call it specifying the parameters
>> similarly on the command line. Something like this:
>
>> pro xxx, a=a, b=b, c=c
>
> as a matter of fact, a,b,c are keywords here. You can also simply do
>
> pro xxx, a,b,c
>
> Jean


That's true. The advantage of using a=a,b=b,... is that I can easily
change the name of the variables if I need to:

IDL> xxx, a=a1, b=b1
IDL> xxx, a=a2, b=b2

Thank you.
Re: SAVE [message #71012 is a reply to message #70886] Fri, 14 May 2010 15:53 Go to previous message
jeanh is currently offline  jeanh
Messages: 79
Registered: November 2009
Member
> One of the suggestions I
> got was to include parameters in my procedure, define the variables
> within the procedure, and then call it specifying the parameters
> similarly on the command line. Something like this:
>
> pro xxx, a=a, b=b, c=c

as a matter of fact, a,b,c are keywords here. You can also simply do

pro xxx, a,b,c

Jean
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Can I open an ENVI Vector File (EVF) in batch mode?
Next Topic: LEGEND and Symcat - part 2

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

Current Time: Wed Oct 08 11:37:12 PDT 2025

Total time taken to generate the page: 0.00457 seconds