[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Usage of System Variables
- Subject: Re: Usage of System Variables
- From: davidf(at)dfanning.com (David Fanning)
- Date: Thu, 2 Dec 1999 10:28:59 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <3846A7E0.27FAA71@ssec.wisc.edu>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:17591
Liam Gumley (Liam.Gumley@ssec.wisc.edu) writes:
> A colleague and I were having a discussion recently about system
> variables in IDL. My colleague regularly uses system variables such as
> !p.region, !p.font, !p.margin for configuring plots. My opinion is that
> system variables should be used as little as possible. In fact the only
> system variable I ever modify is !p.multi for creating multiple plots.
> Otherwise I prefer to use keywords to plot, surface, tv, tvscl, etc.
>
> It seems to me that modifying global system variables is not a good
> idea, since they have a global effect. These days you can write
> applications which run while leaving the IDL command line active, and
> setting/modifying system variables in this case sounds like a recipe for
> disaster.
Hear! Hear!
> Can anyone think of other cases where setting a system variable is the
> only way to achieve the desired effect (e.g. !p.multi)?
!Mouse.Button = 0
While !Mouse.Button NE 4 DO BEGIN
Well, unless you are writing widget programs, which you should
be. :-)
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