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

Home » Public Forums » archive » Re: Global variable vs common block
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Global variable vs common block [message #19397] Thu, 16 March 2000 00:00
kbowman is currently offline  kbowman
Messages: 5
Registered: February 2000
Junior Member
In article <38D0C447.88C54E73@hotmail.com>, marc <m_schellens@hotmail.com>
wrote:

> So my question is: Is there something I have not thought about/do not
> know were I can run into a limitation with this?

DEFSYSV does not solve one of the problems with common blocks - the
inability to have multiple instances of a program running at the same
time.

Ken
Re: Global variable vs common block [message #19398 is a reply to message #19397] Thu, 16 March 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Marc (m_schellens@hotmail.com) writes:

> I have a very large program which uses common blocks (sorry David),
> nowadays I don't like them any more (never liked them but lately I
> discovered the DEFSYSV command :-). I used for the whole program just
> one common block holding one structure (all the global data).
> It was easy to change the suff to use a ('!named') global variable, and
> at a first look everything seem to work fine.
> So my question is: Is there something I have not thought about/do not
> know were I can run into a limitation with this?
> Wanna know this before I spent more time on the prog and eventually have
> to change it back.

I don't know how I gained this reputation as a common
block ogre. My mission was never to ban common blocks,
only to make people think seriously about the alternatives
before they blindly used one. Since "common block" can
hardly be mentioned on this newsgroup without the word
"David" nearby, I must have been successful :-)

In any case, I can't see any problem with DEFSYSV,
except the usual one of changing the definition of
the variable on the fly. And with the new .RESET_SESSION
even that point is nearly moot.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL<-> Matlab conversion
Next Topic: Re: [Q]IDLgrImage Blend_Function

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

Current Time: Wed Oct 08 16:00:34 PDT 2025

Total time taken to generate the page: 0.00523 seconds