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

Home » Public Forums » archive » Re: Keyword checking
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: Keyword checking [message #31013 is a reply to message #31012] Wed, 29 May 2002 06:52 Go to previous messageGo to previous message
Jaco van Gorkom is currently offline  Jaco van Gorkom
Messages: 97
Registered: November 2000
Member
"Randall Skelton" <rhskelto@atm.ox.ac.uk> wrote in message
news:Pine.LNX.4.33.0205291352100.19744-100000@mulligan.atm.o x.ac.uk...
>
> pro test, B=b
> if n_elements(b) eq 0 and arg_present(b) eq 1 then $
> message, 'You passed an undefined variable as a keyword'
> if n_elements(b) gt 0 then b = 'passed'
> end
>
> Surely there must be something simpiler than my 2-step approach ;)

If the difference between "passing nothing" and "not passing anything"
is really important to you, then this is it :-)
Of course, you could always write this into your own function
KEYWORD_UNDEFINED()...

cheers,
Jaco
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: accessing reverse_indices
Next Topic: Re: color in widgets

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

Current Time: Mon Oct 27 15:42:01 PDT 2025

Total time taken to generate the page: 3.44571 seconds