Global variables [message #18856] |
Tue, 08 February 2000 00:00  |
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  |
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  |
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
|
|
|
|