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

Home » Public Forums » archive » Probs w/ keyword_set
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
Probs w/ keyword_set [message #2511] Tue, 02 August 1994 13:39
tai is currently offline  tai
Messages: 14
Registered: June 1994
Junior Member
This is probably old news, but in IDL 3.6 (and I think in 3.51), I
realized early on that you run into problems by setting a keyword
parameter to 0 and running it through keyword_set. I.e. keyword_set
believes the parameter is unset:

pro test, Key = Key
if (keyword_set(Key)) then print, 'Set' $
else print, 'Unset'
end
test, Key = 0

Solution: use n_elements instead of keyword_set. I found this out
from reading through some procedures from the JHUAPL library.


Alan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: convert 4 bytes into a long
Next Topic: Reading binary data from cdrom using new PV-wave(v4.2)

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

Current Time: Sat Oct 11 14:16:10 PDT 2025

Total time taken to generate the page: 1.27683 seconds