Re: How to free luns? [message #12359] |
Thu, 16 July 1998 00:00 |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Joseph Scott Stuart wrote:
>
> I often have the problem when I'm trying to debug a new IDL procedure,
> that it crashes in the middle before getting to the part where it
> frees the LUNs. If I run the program again and again trying to debug
> it, IDL can quickly run out of LUNs. Is there a way to free all of
> the allocated LUNs? Now, I know that I could catch all errors and
> free them in the error handler, but that seems like a hassle when I'm
> debugging code because the error message gets redirected. I could
> just start writing the code correctly the first time, but that would
> take all of the fun out of it.:-)
Just a gentle reminder to RTFM. The CLOSE() routine has a keyword
/ALL that does just what you want. You can also use /FILE to
selectively close units <= 99.
If you ever want to know which files are open, just use:
help, /files
Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|
Re: How to free luns? [message #12365 is a reply to message #12359] |
Thu, 16 July 1998 00:00  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
Alex Schuster wrote:
>
> Joseph Scott Stuart wrote:
>
>> I often have the problem when I'm trying to debug a new IDL procedure,
>> that it crashes in the middle before getting to the part where it
>> frees the LUNs. If I run the program again and again trying to debug
>> it, IDL can quickly run out of LUNs. Is there a way to free all of
>> the allocated LUNs? Now, I know that I could catch all errors and
>
> CLOSE, /ALL does the trick.
>
> Alex
Just for completeness: you can find out your open files with HELP,/FILES
This may help if you only want to close some files but not all, so you
don't have to rerun everything...
Martin.
--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Earth&Planetary Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA
phone: (617)-496-8318
fax : (617)-495-4551
e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
|
|
|
Re: How to free luns? [message #12370 is a reply to message #12359] |
Thu, 16 July 1998 00:00  |
Alex Schuster
Messages: 124 Registered: February 1997
|
Senior Member |
|
|
Joseph Scott Stuart wrote:
> I often have the problem when I'm trying to debug a new IDL procedure,
> that it crashes in the middle before getting to the part where it
> frees the LUNs. If I run the program again and again trying to debug
> it, IDL can quickly run out of LUNs. Is there a way to free all of
> the allocated LUNs? Now, I know that I could catch all errors and
CLOSE, /ALL does the trick.
Alex
--
Alex Schuster Wonko@weird.cologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
|
|
|