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

Home » Public Forums » archive » simple question about bytes
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: simple question [message #20146 is a reply to message #16986] Fri, 19 May 2000 00:00 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Pavel Romashkin wrote:
>
> Isn't breaking out of DO loops the same as using conditional loops? FOR
> / DO have a particular purpose, to execute a certain number of times.
> For repeating under a condition, WHILE and REPEAT are provided, I think.

I agree. But both WHILE and REPEAT exit the conditional loop once a
specified condition occurs. Sometimes, you don't want to exit the loop,
just skip the current cycle and continue. The existence of WHILE and
REPEAT certainly limit the need for a BREAK type of statement, but not a
CONTINUE (or CYCLE). In addition, the WHILE and REPEAT don't provide you
with the current loop index (i.e. you have to do your own i = i + 1
within the loop). I guess one's preference for using WHILE/REPEATs or
FOR loops with CONTINUE/BREAKs stems non-trivially from personal
aesthetic.

paulv
--
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.202, 5200 Auth Rd. Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: directing control after program interruption
Next Topic: runtime IDL, blocking widgets

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

Current Time: Sun Oct 12 06:24:30 PDT 2025

Total time taken to generate the page: 1.20260 seconds