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
undefined keyword variables [message #17531] Sat, 30 October 1999 00:00 Go to previous message
Mark Fardal is currently offline  Mark Fardal
Messages: 51
Registered: October 1995
Member
Hi,

A question: should you always be able to pass undefined variables as
keywords to IDL routines?

For example, PLOT is smart enough not to do anything with this undefined
variable

IDL> plot,x,y,title=donkeykong
[plots fine]

but not this one
IDL> plot,x,y,clip=pong
% PLOT: Variable is undefined: PONG.
% Execution halted at: $MAIN$
[no plot produced]

IDL> help,donkeykong, pong
DONKEYKONG UNDEFINED = <Undefined>
PONG UNDEFINED = <Undefined>

Should this be considered a bug in plot, or as normal behavior?

In general I don't know why you should be able to safely feed
undefined variables to routines and expect them to work. But if you
can't, it leads to annoying problems in writing interfaces to any
routine with lots of keywords. In my case, I wanted to write a
routine that called plot and then oplot, which use different sets of
optional keyword parameters. The best solution I know of is to
construct a value for the _extra keyword, but it's a pretty convoluted
solution.

Mark Fardal
UMass
[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 04:40:23 PDT 2025

Total time taken to generate the page: 0.63926 seconds