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

Home » Public Forums » archive » keyword_set bug or feature
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_set bug or feature [message #4299 is a reply to message #4216] Tue, 16 May 1995 00:00 Go to previous messageGo to previous message
soc is currently offline  soc
Messages: 12
Registered: October 1994
Junior Member
Chris-Chase-S1A (chase@stewart.jhuapl.edu) wrote:
: >>>>> "Rob" == Stephen O'Connell <soc@festival.ed.ac.uk> writes:

: Rob> Keyword is more than just 1/0 switches! And if you are using them
: Rob> to pass values, you just might mistakenly set one equal to zero.
: Rob> Andd although its true that you can use n_elements, you're still
: Rob> buggered if you have more than one keyword...so it is a bug
: Rob> really, in my opinion. Maybe ver. 4.0 has it sorted - does
: Rob> anyone know ?

: It is not a bug. KEYWORD_SET works exactly as documented in the "IDL
: Reference Guide". Furthermore, the guide states: "This function is
: especially useful in user-written procedures and functions that
: process keywords that are interpreted as being either true (keyword
: present and nonzero) or false (keyword was not used, or was set to
: zero)." Thus, its purpose is not for checking if a keyword is used to
: pass values. Just because KEYWORD_SET does not do what you wish does
: not mean it has a bug. Use

: N_ELEMENTS(var) NE 0

: to check for defined keywords. You can make your own function
: "KEYWORD_DEFINED()" if you think it is more convenient than
: "N_ELEMENTS(var) NE 0".

: Chris

Thanks Chris, I was totally wrong. Mark Rivers, thanks to him too,
so sorry. I got confused with n_params.

I'll never post again (ah I'm more thck skinned than that!)

Rob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Angstrom symbol
Next Topic: IDL spreadsheet??

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

Current Time: Thu Oct 09 20:00:25 PDT 2025

Total time taken to generate the page: 0.00590 seconds