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 #20160 is a reply to message #16986] Thu, 18 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
Craig Markwardt wrote:
>
> "richard hilton" <rdh5@dmu.ac.uk> writes:
>
>> This probably sounds like a stupid question but does anybody know of an IDL
>> equivilent to the CONTINUE command in C/C++ ? Your help would be much
>> appreciated.
>
> I've wished for an equivalent to continue and break, but have never
> found it. You will have to do use GOTO explicitly.
>
> for i = 0, n-1 do begin
> if val(i) EQ 0 then goto, NEXT_VAL ;; equivalent to continue
> compute_val, val(i)
> if val(i) LT 0 then goto, DONE_VAL ;; equivalent to break
> NEXT_VAL:
> endfor
> DONE_VAL:

If there's one thing I loathe, it's GOTO'ing _out_ of DO/IF
loops/constructs. I, too, wish IDL would introduce statements such as
the CYCLE (equiv to CONTINUE) and EXIT (equiv to BREAK) statements in
F90/F95. Sure makes logic in DO loops and IF constructs supa-easy to
follow (although I have to admit the example above is clear and easy to
follow).

How would one begin the process of doing this, i.e. getting RSI to
introduce new control transfer statements such as CYCLE and BREAK? I
can't see that it would be a terribly difficult thing to do but I don't
write compiler type stuff.

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 08:27:31 PDT 2025

Total time taken to generate the page: 0.23880 seconds