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

Home » Public Forums » archive » endless loop problem
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
endless loop problem [message #68964] Sun, 06 December 2009 15:11
Wasit.Weather is currently offline  Wasit.Weather
Messages: 62
Registered: February 2008
Member
Hi All,
I would like to run iterations until a condition is met. But it runs
non-stop. What is the problem with the following code? The problem is
L reaches the value 1.2840277, but the loop still loops and gives
1.2840277 over and over. How to I stop it when it reaches to
1.2840277?
Thanks

;E1 = Unit vector, known
; Z is known matrix
REPEAT BEGIN
C = Z##E1
L = sqrt(EC[0]+EC[1])
E1 = EC/L
print,L
;Keep going until nothing is moved.
ENDREP UNTIL L LT 1.2840277

Best
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: remote applications kills X upon IDL exit
Next Topic: number of iterations

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

Current Time: Wed Oct 08 17:00:04 PDT 2025

Total time taken to generate the page: 0.00510 seconds