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 #88344 is a reply to message #88337] Tue, 15 April 2014 21:23 Go to previous messageGo to previous message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
Thanks guys!
Chris, I especially like your suggestion!

G

On Tuesday, April 15, 2014 2:31:19 PM UTC-5, Chris Torrence wrote:
> 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:10:44 PDT 2025

Total time taken to generate the page: 0.00474 seconds