[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to kill a procedure?



Med Bennett wrote:

> I am wondering how to kill an errant IDL procedure in Windows 95 without
> killing the whole application and starting over.  I sometimes make a
> programming error which causes a procedure to go into an infinite loop.
> It seems like I used to be able to hit ctrl-C in older versions of IDL,
> at least in procedures that had some sort of print statement in them, to
> exit out of a procedure.  But recently when this has happened, nothing
> seems to work and I have to hit ctrl-alt-delete and kill IDL entirely,
> which is very annoying, especially if I have unsaved variables.  Any
> suggestions would be greatly appreciated!

I think you are out of luck here. And I seriously doubt whether
you were ever able to interrupt a loop in IDL previously. Normally,
something like a FOR loop is considered a single command to the
IDL compiler. IDL will only look for interrupt characters at the 
end of each command. 

I've written my own share of infinte loops, especially before
I learned to *ALWAYS* cancel my CATCH error handler in my
error handling code. Nothing like having errors in the error
handling code to put IDL into a tight (and uninterruptable) 
spin. :-)

Cheers,

David

-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155