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

Home » Public Forums » archive » Re: Bug in N_PARAMS?
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: Bug in N_PARAMS? [message #64010 is a reply to message #63986] Mon, 24 November 2008 14:20 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth P. Bowman writes:

> I have been having some very odd problems with the N_PARAMS function lately.
> ...
> Am I missing something obvious here?

N_PARAMS only tells you *how many* parameters the
command is called with. It tells you nothing about
the *type* of the parameter. Since "undefined" is
a valid variable type in IDL, it is possible to
pass an "undefined" variable and have it counted
as a passed *number* of variables by N_PARAMS.

If you are concerned with if a variable is undefined
or not, you can't use N_PARAMS to determine this. The
only way to tell is to use N_ELEMENTS.

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: areas with 'hatching' in plots?
Next Topic: Bug in N_PARAMS?

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

Current Time: Wed Oct 08 19:02:40 PDT 2025

Total time taken to generate the page: 0.00410 seconds