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

Home » Public Forums » archive » Keyword_set() (was: Re: Fitting curves)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Keyword_set() (was: Re: Fitting curves) [message #2867] Tue, 06 September 1994 06:49
ryba is currently offline  ryba
Messages: 33
Registered: October 1992
Member
In article <34h7oi$aa1@aragorn.unibe.ch>, larkum@iam.unibe.ch (Matthew Larkum) writes:
|> Specifically, his procedure uses the keyword FUNCTION_NAME which is a
|> string that gives the name of the procedure to be used in place of FUNCT.
|> This is a much better idea, but it isn't part of the procedure we got
|> with our version of PV-Wave version 4.2.
|>
|> On the other hand, I liked the modifications made by Amara Graps in his
|> version of CURVEFIT, so I put in the (trivial) code to include the
|> FUNCTION_NAME keyword into CURVEFIT and the resulting MYCURVEFIT is
|> given below.
|>
|> if not keyword_set(function_name) then function_name = 'FUNCT'

Wrong!!! Keyword_set should *only* be used for keyword parameters,
which can take the values of 0,1 or undefined. You should use:

IF n_elements(function_name) EQ 0 THEN function_name = 'FUNCT'

With a string argument, you're probably safe, but this subtlety may bite
you sometime if you're not careful.

--
Dr. Marty Ryba | Generation X:
MIT Lincoln Laboratory | Too young to be cynical,
ryba@ll.mit.edu | too old to be optimistic.
Of course nothing I say here is official policy, and Laboratory affiliation is
for identification purposes only, blah, blah, blah....
[Message index]
 
Read Message
Previous Topic: inexplicable LONG() - behaviour
Next Topic: XYOUTS overwrites

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

Current Time: Thu Oct 09 15:00:30 PDT 2025

Total time taken to generate the page: 1.12580 seconds