Re: Deleting Variables [message #11617 is a reply to message #11614] |
Fri, 24 April 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Nathan Lundblad (lundblad@ugastro.berkeley.edu) writes:
> How does one delete variable in IDL?
>
> I know _delvar_, but that only works on the
> main level of the program, and only one on
> variable. I want to purge everything.
If you wanted to get rid of all the IDL variables that
exist at the main IDL level, you could write a program
like this:
PRO Purge
END
When you want to get rid of all main-level variables,
you would type:
IDL> .RNew Purge
If you want to get rid of a single variable within an
IDL program module (i.e., NOT at the main level), you
can download the program UNDEFINE from my web page:
Undefine, variable
If you want to get rid of all the pointers and objects
you have accidentally deleted references to, you can
type this:
IDL> Heap_GC
If you just want to get rid of *everything* (including
common blocks, which can be deleted in no other way),
most of the experts use this trick:
IDL> Exit
:-)
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|