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

Home » Public Forums » archive » Read and Write IDL SAVE files!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Read and Write IDL SAVE files! [message #23744 is a reply to message #23679] Wed, 14 February 2001 12:10 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"Christopher W. O'Dell" <odell@cmb.physics.wisc.edu> writes:

> Craig,
>
> Your library looks GREAT. I'm still using v5.2, however, and your CMRESTORE
> routine had some problems restoring
> a file written with SAVE (v5.2), giving the following error for each variable
> in the file:
>
> %CMRESTORE: WARNING: could not create variable QFINALMAP in calling routine.
> ...
>
> However, when i do
>
> idl> CMRESTORE, filename, qfinalmap
>
> it restorest that variable just fine. Any ideas?

Yes, you really have two choices:

* upgrade to IDL 5.3, or;
* define the variables before you call CMRESTORE.

Before IDL 5.3, there was no programmatic way to *create* a variable
at the caller's level, but you can modify an existing one.

When you type,

CMRESTORE, filename, qfinalmap

you are passing by argument, which is something completely different.
The values are returned by argument, so CMRESTORE doesn't have to try
to deposit them in the caller's level. This should proceed without a
hitch.

I should note that it doesn't matter *how* you define the variable, or
even that you give it a defined value! As long as it exists as a
named variable you should be fine.

This leads me to my recommended procedures:

* if you are simply trying to restore all the variables, go ahead and
use RESTORE.

* if you want to restore selected variables, then use one of these:
CMRESTORE, filename, qfinalmap ; or
CMRESTORE, x0, x1, names=['filename', 'qfinalmap']

* if you are writing a program then there are some other helpful ways
to exchange data, using either pointers, or a structure.

Have fun Chris!
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL listbox
Next Topic: Re: I have the craziest idea...

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

Current Time: Sat Oct 11 08:39:06 PDT 2025

Total time taken to generate the page: 1.28169 seconds