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

Home » Public Forums » archive » 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 #64041 is a reply to message #64011] Mon, 01 December 2008 14:55 Go to previous messageGo to previous message
Mark[1] is currently offline  Mark[1]
Messages: 66
Registered: February 2008
Member
On Dec 2, 3:11 am, Jeremy Bailin <astroco...@gmail.com> wrote:
> Except that there are valid reasons for passing in
> an undefined variable, if it's used for output. So
> it's perfectly legitimate to want to know whether
> it was passed in without caring whether it is
> defined.

To check that an argument has been passed, and can be written to, you
can use ARG_PRESENT.

To check that a argument has been passed, and is a defined variable,
you can use N_ELEMENTS > 0.

This leaves N_PARAMS for the cases where you want to know if an
argument has been passed, but otherwise don't care about its status.
In my experience. this is pretty rare, except in what I would call
wrapper routines.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Bug in N_PARAMS?
Next Topic: Re: streamlines over contour without iVector

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

Current Time: Fri Oct 10 09:59:20 PDT 2025

Total time taken to generate the page: 1.04161 seconds