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

Home » Public Forums » archive » Re: Stop program in IDL 6.2
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
Re: Stop program in IDL 6.2 [message #73544] Fri, 12 November 2010 09:03 Go to next message
Ammar Yusuf is currently offline  Ammar Yusuf
Messages: 36
Registered: October 2010
Member
> No, a FOR loop is a single command to the IDL interpreter.
> It doesn't look for a CNTL-C until after it is out of the
> loop and looking for the next command. If the interpreter
> looked for control characters inside of FOR loops, they would
> be slower than they already are. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Ah okay. Makes sense. Thanks.
Re: Stop program in IDL 6.2 [message #73546 is a reply to message #73544] Fri, 12 November 2010 08:54 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ammar Yusuf writes:

> No, it's just a simple program:
>
> for i = 0L, 10000 do begin
> index = total(findgen(1000000))
> endfor
>
> print, index
>
> end
>
> Of course it takes a few minutes to compute. It's just a test program
> and when I run it through IDL 6.2 I want to stop execution in the
> middle but that doesn't work by hitting pause/break on the computer or
> control c but that doesn't work. I have to wait for the program to
> stop executing or hit a stop statement to suspend. Thanks.

No, a FOR loop is a single command to the IDL interpreter.
It doesn't look for a CNTL-C until after it is out of the
loop and looking for the next command. If the interpreter
looked for control characters inside of FOR loops, they would
be slower than they already are. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Stop program in IDL 6.2 [message #73547 is a reply to message #73546] Fri, 12 November 2010 08:47 Go to previous messageGo to next message
Ammar Yusuf is currently offline  Ammar Yusuf
Messages: 36
Registered: October 2010
Member
On Nov 12, 11:29 am, David Fanning <n...@dfanning.com> wrote:
> Ammar Yusuf writes:
>> Hi, in IDL 6.2 when a program is running how do you stop execution of
>> the program in the middle because every time I click on it IDL just
>> freezes and I have to use the Task Manager to end the program. I tried
>> using control - c to stop execution but that didn't work.
>
> This sounds more like a run-away CATCH error handler
> to me. Are you canceling the CATCH as the first line
> in your error handler?
>
> Once you get into these infinite loops, they are VERY
> difficult to get out of. CNTL-C doesn't help at all,
> as you realize.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

No, it's just a simple program:

for i = 0L, 10000 do begin
index = total(findgen(1000000))
endfor

print, index

end

Of course it takes a few minutes to compute. It's just a test program
and when I run it through IDL 6.2 I want to stop execution in the
middle but that doesn't work by hitting pause/break on the computer or
control c but that doesn't work. I have to wait for the program to
stop executing or hit a stop statement to suspend. Thanks.
Re: Stop program in IDL 6.2 [message #73548 is a reply to message #73547] Fri, 12 November 2010 08:29 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ammar Yusuf writes:

> Hi, in IDL 6.2 when a program is running how do you stop execution of
> the program in the middle because every time I click on it IDL just
> freezes and I have to use the Task Manager to end the program. I tried
> using control - c to stop execution but that didn't work.

This sounds more like a run-away CATCH error handler
to me. Are you canceling the CATCH as the first line
in your error handler?

Once you get into these infinite loops, they are VERY
difficult to get out of. CNTL-C doesn't help at all,
as you realize.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Stop program in IDL 6.2 [message #73658 is a reply to message #73544] Sun, 14 November 2010 18:38 Go to previous message
russell.grew is currently offline  russell.grew
Messages: 74
Registered: February 2005
Member
For what it's worth I find Ctrl+BREAK (on the pause key up near scroll
lock) works better than Ctrl+C if you are using windows. Don't ask me
why.

Cheers.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: run .sav file with -args
Next Topic: Good-bye Plot, Surface, Contour, TV and all the rest!

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

Current Time: Fri Oct 10 12:47:59 PDT 2025

Total time taken to generate the page: 0.31965 seconds