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

Home » Public Forums » archive » Global variables
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
Global variables [message #18856] Tue, 08 February 2000 00:00 Go to next message
Erik Hummel is currently offline  Erik Hummel
Messages: 6
Registered: February 2000
Junior Member
On a PC with Windows NT and object programming I like to use global
constants. I
like to define for instance some integer constant without the use of
common
blocks (the common block always has to be repeated before the variables
can be used)
or system variable.
Is it possible to declare a global constant without the use of common
blocks?
Regards,
Erik

--

-------------------------------------------------
Erik Hummel dr. E. Hummel
MR Image Handling Software

email: erik.hummel@best.ms.philips.com
Phone: +31 40 2763318
Fax: +31 40 2765644

Philips Medical Systems
Building QR1117, Veenpluis 6, 5684 PC Best
The Netherlands
===================================================
Re: global variables [message #30333 is a reply to message #18856] Fri, 19 April 2002 08:49 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
This subject used to be a can of worms, until David told us :-) that
Common blocks can be used in widget programs without causing total
chaos. There are a lot of answers you can find if you search this group
for "global variable".
It is possible in a number of ways, but is not adviseable unless you
work from the Main level in the interactive mode. In which case all of
you variables are global anyway.
Cheers,
Pavel

Dan Larson wrote:
>
> Is it possible to define global variables in IDL?
>
> Thanks,
>
> Dan
Re: global variables [message #30337 is a reply to message #18856] Fri, 19 April 2002 06:34 Go to previous message
David Burridge is currently offline  David Burridge
Messages: 33
Registered: January 1998
Member
Hi Dan,

"Dan Larson" <drl16@cornell.edu> wrote in message
news:MPG.1728b36d7aa7a4df98968b@newsstand.cit.cornell.edu...
> Is it possible to define global variables in IDL?
>
> Thanks,
>
> Dan

It breaks my heart to tell you this (assuming you don't already know) but
you can define 'common blocks' to carry around data making it pseudo-global
in scope. But ..... beautiful coding it aint!-)

Dave
Re: global variables [message #30366 is a reply to message #18856] Thu, 18 April 2002 08:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dan Larson (drl16@cornell.edu) writes:

> Is it possible to define global variables in IDL?

It is possible to define system variables in IDL.
That's about as close as it gets. :-)

See DefSysV.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@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: Chi-square decision trees
Next Topic: matrix log and exp

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

Current Time: Wed Oct 08 17:40:50 PDT 2025

Total time taken to generate the page: 0.01012 seconds