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

Home » Public Forums » archive » STATIC 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: static variables [message #8887 is a reply to message #2690] Wed, 30 April 1997 00:00 Go to previous messageGo to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Jonathan Rogness (rogness@sg1.cr.usgs.gov) wrote:
: Sorry to answer my own question, but I had forgotten IDL supports global
: variables using Common Blocks. All my training as a programmer tells me
: not to use global vars, but if it works then I guess I can deal with it.
: :-)

Well, you're in luck! Variables in common blocks are not global, merely
static; they have scope only over the functions in which the common
block is declared. This is true even for the main level, the common
block has to be declared there for the variables to exist. In general,
the same name can be reused inside different common blocks, provided
they aren't both used in the same namespace.

Peter
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: static variables
Next Topic: passing parameters on to other functions

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

Current Time: Sat Oct 11 18:40:45 PDT 2025

Total time taken to generate the page: 3.03904 seconds