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

Home » Public Forums » archive » Re: 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 #33831 is a reply to message #33827] Sat, 01 February 2003 08:14 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
I wrote yesterday:

> I don't think so. The whole point of the BEGIN ... END syntax
> is to make the statements inside appear to be a single statement
> to the compiler. The only recourse is to let the loop go to
> completion. With an infinite loop, well, they don't call
> them "infinite" for no reason. :-)

Apparently I owe an apology to Pavel. It has been
pointed out to me by a long-time IDL newsgroup reader,
who wishes not to embarrass me, that I don't know what
the hell I'm talking about when it comes to this topic.
(Have you noticed that IDL newsgroup readers are exceptionally
kind to one another? It's one of the things that makes
this newsgroup so much fun to hang out in. :-)

So I admit, "infinite" WHILE loops *can* be interrupted, as
long as they use BEGIN ... END statement blocks.
Try this:

PRO Test
While 1 DO BEGIN
Print, 'Test before you Post!'
ENDWHILE
END

On my Windows machine I can interrupt this program (after
I've learned my lesson) by doing a CNTL-Break.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL, arrays, and memory
Next Topic: Expert information needed

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

Current Time: Fri Oct 10 13:36:35 PDT 2025

Total time taken to generate the page: 0.63998 seconds