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

Home » Public Forums » archive » undefined keyword variables
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: undefined keyword variables [message #17615 is a reply to message #17531] Mon, 01 November 1999 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:

> As to David's suggestion to define default values, that's not always
> feasible. What about the POSITION keyword? If it's not defined then
> you want to rely on IDL's standard positioning. No default should be
> required!

I think it is not only feasible, but required, that you
provide default values for *any* variable you plan
to use in the code. Certainly if I were planning to
use the POSITION keyword I would have something like this:

IF N_Elements(thePosition) EQ 0 THEN thePosition=!P.Position
...
Plot, data, Position=thePosition

As for keywords that come in with _Extra, well, that's
what God made the Catch statement for. :-)

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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Can this be vectorized?
Next Topic: change widget slider maximum dynamically?

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

Current Time: Fri Oct 10 20:13:27 PDT 2025

Total time taken to generate the page: 1.11846 seconds