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

Home » Public Forums » archive » endless loops suck
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: endless loops suck [message #33914 is a reply to message #33853] Tue, 04 February 2003 02:26 Go to previous message
alt is currently offline  alt
Messages: 28
Registered: August 2001
Junior Member
on my win98 !version = { x86 Win32 Windows 5.4 Sep 25 2000 32
64}
I have the next situation

while 1 do a = 0 ; can not be breaked

while 1 do begin ; can not be breaked
a = 0
endwhile

while 1 do begin ; can be breaked by
a = 0 ; 1. clicking on Break button (always works)
print, '' ; 2. pressing F9 with cursor on desired line
endwhile ; 3. pressing Cntl-Break (sometimes interrupts with
; very long delay or does not work at all)

Print is very time consuming operation, so I usually use something
like this:
if i mod 1000 EQ 0 then print, i, N

Instead of "print" TMP = WIDGET_EVENT(/NOWAIT) can be used. It forces
IDL to
process Windows events including break events and events that were
sent to IDL by other applications. It allowes other applications
continue to work and makes the work on Windows "smoother" while IDL is
running.

Altyntsev Dmitriy




Thomas Gutzler <tgutzler@ee.uwa.edu.au> wrote in message news:<3E39E56E.5050803@ee.uwa.edu.au>...
> Hey :)
>
> Is there any way to stop this while debuging ?
> I tried CTRL+C and CTRL+BREAK which sometimes helps but not in this case.
>
> pro loop_it
> a = 1
> while (1) do a = a + 1
> end
>
> pro kill_idl
> print, 'start'
> ; debugger is here and you pressed accidently 'F10'
> => loop_it
> print, 'stop'
> end
>
> *loop*,
> Tom
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: OPENW and environment variables in IDL 5.5
Next Topic: Re: Test if variable is a string

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

Current Time: Wed Oct 08 19:33:49 PDT 2025

Total time taken to generate the page: 0.00392 seconds