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

Home » Public Forums » archive » Re: dealing with arguments
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: dealing with arguments [message #71267 is a reply to message #71118] Wed, 02 June 2010 15:17 Go to previous message
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
On Jun 2, 3:12 pm, pp <pp.pente...@gmail.com> wrote:
> Use keywords instead of positional arguments:
>
> pro name, mode, s1=s1, s2=s2
>
> That way, when calling the routine you can use any order, or omit any
> argument, and they still get associated to the right variables. Also
> consider replacing s1 and s2 by more descriptive names, to make it
> easier for users to know what the arguments mean. With keywords, you
> can still use the short names inside your routine:
>
> pro name, mode, some_argument_name_1=s1, some_other_argument=s2


Thank you, pp. So if mode=2 and I want to make s2=100 then all I need
is:

proname, 2, s2=100 ?
[Message index]
 
Read Message
Read Message
Previous Topic: Re: FOR loop ends one above where it's supposed to
Next Topic: dealing with arguments

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

Current Time: Fri Oct 10 06:27:56 PDT 2025

Total time taken to generate the page: 0.96009 seconds