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

Home » Public Forums » archive » Re: Preserving Variables
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: Preserving Variables [message #10197 is a reply to message #10190] Wed, 29 October 1997 00:00 Go to previous messageGo to previous message
R. Bauer is currently offline  R. Bauer
Messages: 137
Registered: November 1996
Senior Member
David Fanning wrote:

> Matthew Hanson (matt@ktaadn.com) writes:
>
>> Anyone know how to make statis variables? That is, upon returning to a
>> function, how can i create a variable that has the same value as when i
>> left the function before? I really don't want to use Common Blocks.
>
> I'm not sure how this could be done in a regular IDL
> function without common blocks (I say this knowing I
> am risking my reputation among students who have heard
> my anti-commmon block lectures :-). Perhaps with Save/Restore
> functionality, but I have to think, why bother?
>
> In a widget program this kind of thing is easily accomplished
> with either pointers or user values. See any of the widget
> programs on my web page for examples. I guess you could do
> it with pointers with a regular function too, as long as
> the pointer was passed into the function as a parameter.
>
> output = My_Function(ptrToStaticVariables)
>
> Cheers,
>
> David

An idea may be to use a systemvariable as readonly

Re

--
R.Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: droplist items
Next Topic: Minization of one variable

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

Current Time: Wed Oct 08 17:43:05 PDT 2025

Total time taken to generate the page: 0.00545 seconds