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

Home » Public Forums » archive » Re: Static Variables in IDL
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: Static Variables in IDL [message #5901] Thu, 14 March 1996 00:00 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <4i7ara$606@vixen.cso.uiuc.edu>, santanu@ux7.cso.uiuc.edu (Santanu Bhattacharyya) writes:
|>
|> Hi,
|> Is there a way to statically allocate variables in IDL ? I would
|> like to define a static variable in a .pro which is repeatedly called
|> from an upper level. I am specifically looking for the IDL counterpart
|> of
|> static int testint;
|>
|> I would appreciate any help in this regard,

The IDL counterpart is to put the variable in a common block:

pro test
common test_static,testint

if N_elements(testint) eq 0 then testint = <init_value>

;; Use your testint variable for anything.
;; It keeps it's value between each call
end


Stein Vidar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Surface
Next Topic: Re: Widgets - 3.6 -> 4.0 Aaarrrggghhh!!

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

Current Time: Wed Oct 08 15:23:27 PDT 2025

Total time taken to generate the page: 0.00409 seconds