Re: Stop program in IDL 6.2 [message #73544] |
Fri, 12 November 2010 09:03  |
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 #73547 is a reply to message #73546] |
Fri, 12 November 2010 08:47   |
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.
|
|
|
|
|