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

Home » Public Forums » archive » CATCH inside a FOR loop and out?
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: CATCH inside a FOR loop and out? [message #88337 is a reply to message #88325] Tue, 15 April 2014 12:31 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
One important point - "catch" is expensive. It's better to put it outside of the for loop, and just use a "start" index to continue. Something like:

start = 0
catch, err
if (err ne 0) then begin
start = i + 1
print, 'bad error'
endif
for i=start, finish do begin
...
endfor

Cheers,
Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DLM "unload"?
Next Topic: traces plot outside of x-axis boundaries

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

Current Time: Wed Oct 08 18:11:56 PDT 2025

Total time taken to generate the page: 0.00257 seconds