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

Home » Public Forums » archive » About keywords and positional parameters
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: About keywords and positional parameters [message #32812 is a reply to message #32720] Thu, 07 November 2002 12:37 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Thu, 07 Nov 2002 09:57:54 -0700, David Fanning wrote:

> lily_zhang (fengliza@sina.com) writes:
>
>> Would you tell me how to distinguish the keywords and positional
>> parameters in IDL procedures and functions?
>
> Positional parameters are those variables that come after the command
> name. They have a position after the name (1, 2, 3, etc.). Keyword
> parameters also come after the command name, but they have a
> KEYWORD=variable (or sometimes a /KEYWORD, which means KEYWORD=1)
> appearance. Keyword parameters can come in any order and don't affect
> the count of positional parameters.
>
> You can't tell from looking whether a positional or keyword parameter is
> an input parameter or an output parameter (or both). You have to read
> the documentation to discover this.
>
>
>
I agree that you can't tell if a parameter is *meant to be* an input
parameter, an output parameter, or both without reading the documentation,
but you certainly can tell whether it is *capable* of passing output:

if arg_present(parameter) then parameter=myungodlyfunction(foo)

ARG_PRESENT() may or many not reveal anything useful, depending on the
context. Its primary legitimate use is in avoiding calculations of
optional keyword/argument outputs if the caller didn't ask for them.

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Fit a circle ?
Next Topic: slicer3

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

Current Time: Thu Oct 16 01:27:11 PDT 2025

Total time taken to generate the page: 0.96738 seconds