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

Home » Public Forums » archive » Re: Usage of System 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
Re: Usage of System Variables [message #18159] Thu, 02 December 1999 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: astro coords pro: equatorial to horizon (rd2azel.pro)
Next Topic: Re: Loop Limit Error

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

Current Time: Sun Oct 12 06:01:31 PDT 2025

Total time taken to generate the page: 1.27823 seconds