Re: help, IDL eats my variables [message #77838] |
Tue, 04 October 2011 10:31 |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 10/4/11 11:08 AM, desertdryad wrote:
> Question - I would like to run several instances of a function and
> save the output to several independent variables, in one IDL session.
> It seems, periodically, IDL 'eats' my saved variables and I have to
> start over! (sigh) This seems to correlate with running something
> that throws an error; IDL appears to 'retall' and wipe everything out
> - is this correct? Is there any way to avoid this behavior?
> (besides, well, not having a function throw an error...)
I could be misunderstanding your situation, but I believe what is
happening is that when IDL throws an error, it brings the scope to the
level where the error occurred. For example, if you call a program from
the command line, i.e., starting at the main-level and the program
crashes, your command line will now be at the level of your program --
you will be able to access local variables in your program from the
command line. At that level, your variables don't exist (they're still
at the calling level though!). In this case, RETALL will save you,
bringing you back to the main-level where your variables are.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
|
|
|