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

Home » Public Forums » archive » Re: IDL interpreter questions - can someone (D.Fanning) explain - TIA
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: IDL interpreter questions - can someone (D.Fanning) explain - TIA [message #25168 is a reply to message #25075] Sat, 19 May 2001 10:20 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
<mankoff@I.HATE.SPAM.lasp.colorado.edu> writes:

> On 18 May 2001, Craig Markwardt wrote:
>> As for continuations, closures, etc., these are computer science
>> jargon for specific language behaviors. IDL has none of them. I
>> understand continuations to be a way for execution contexts to be
>> suspended, saved, and later restored. Perhaps the CATCH error
>> handling technique is a nascent continuation. Alas, this has nothing
>> to do with the CONTINUE reserved word recently added to FOR and WHILE
>> loops.
>
> ok, i get it.
>
> But if you want to "suspend, save, restore" the execution state, wouldn't
> "save, /vars" and "save, /all" simulate this to some extent?

Yes, sort of, but a formal continuation also saves the execution
context, not just the variables. Take a look at CATCH for exception
handling and you will see that CATCH can essentially return *twice*.
Once in the normal program flow, and a second time if an error occurs.

So, internally CATCH saves the execution context so that when an error
happens the execution can resume again within CATCH. To be honest I
don't totally understand formal continuations, but I think CATCH is a
rudimentary example of one.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Checkbox Starting Checked
Next Topic: Re: [Newbie]writing JPEG or GIF file with plot?

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

Current Time: Wed Oct 08 17:07:11 PDT 2025

Total time taken to generate the page: 0.00484 seconds