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

Home » Public Forums » archive » Curious Keywords
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
Curious Keywords [message #8395] Thu, 27 February 1997 00:00
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
Hi folks,

A Keyword question:

I was curious how IDL built-ins can distiguish a passed keyword with an
undefinded variable from a keyword never passed at all, and why this
feature is not implemented in the language itself.

E.G. :

I can say (for some undefined variable UNDEF):

plot, findgen(100), findgen(100)/99.*2*!PI,POLAR=UNDEF

and get a straight line. (Or I can set UNDEF=1 and get a spiral o'
Archimedes).

I cannot, however, say:

plot, findgen(100), findgen(100)/99.*2*!PI, THICK=UNDEF

Since this generates an "a undefined" error message. This implies that
plot *knows* I am using the keyword "THICK", even when I am passing an
undefined variable -- a possibility which most of us discovered the hard
way is not implementable in IDL code. That is, if IDL's plot routine
were written in IDL code, the previous call would be equivalent, for all
practical purposes, to a call in which the keyword were ommitted.

Any thoughts?

JD
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: multiplot and /noerase
Next Topic: 0.0/0.0 --> Segmentation Fault

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

Current Time: Wed Oct 08 20:03:34 PDT 2025

Total time taken to generate the page: 0.00572 seconds