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

Home » Public Forums » archive » how to interrupt in IDL for windows ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
how to interrupt in IDL for windows ? [message #34848] Wed, 23 April 2003 08:34 Go to next message
Kristian Kjaer is currently offline  Kristian Kjaer
Messages: 58
Registered: June 1998
Member
(I've been using IDL a lot recently, and now I am stopping to ask for
help with various problems I encountered.)

In IDL for windows you can't always get control back if you let IDL
loose on something that takes forever.

I am using Craig Markwardt's nice MPFITFUN. Usually it converges fast
but sometimes by mistake I let it loose with the wrong start parameters,
too many free parameters, and a large number of allowed iterations. Then
I can only sit and wait for my IDL prompt to come back, or kill the
whole process and loose some of my work.

On linux I think it always works to type ctrl(c) into the xterm window
where you run idl (not idlde). Then you get an IDL prompt, and RETALL
brings you back to MAIN level.
But on windows you can type ctrl(c) or ctrl(break) to your heart's
desire, and IDL will keep droning on. The problem may be that you can't
get focus on the command line so ctrl(break) ends up in the wrong place.
I used to think that it helped to include
WAIT,0.05
inside loops, but now I still don't get control back with ctrl(c) or
ctrl(break) (IDL 5.2 and 5.6).

Does anyone know how to interrupt simply?

Failing that, does anyone have a widget stop button that could be
queried inside loops and appropriately reacted on?

Thanks for any advice,
- Kristian
Re: how to interrupt in IDL for windows ? [message #34901 is a reply to message #34848] Sun, 27 April 2003 16:58 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"Kristian Kjaer" <Kristian.Kjaer@Risoe.DK> wrote in message
news:3EA6B27D.BB6457C2@Risoe.DK...
> (I've been using IDL a lot recently, and now I am stopping to ask for
> help with various problems I encountered.)
>
> In IDL for windows you can't always get control back if you let IDL
> loose on something that takes forever.
>
> ...
>
> Does anyone know how to interrupt simply?

There was a thread on this subject in February 2003 entitled "Endless loops
suck".

We have Altyntsev Dmitriy <alt@iszf.irk.ru> to thank for pointing out that
you can make IDL code interruptible on Windows by including the following
statement:

tmp = widget_event(/NOWAIT)

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Length of minor tick marks.
Next Topic: Good Bye

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

Current Time: Wed Oct 08 13:07:16 PDT 2025

Total time taken to generate the page: 0.00569 seconds