octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: functions with 'named' arguments


From: Dupuis
Subject: Re: functions with 'named' arguments
Date: Tue, 18 Mar 2008 01:41:58 -0700 (PDT)



Soren Hauberg wrote:
> 
> 
> man, 17 03 2008 kl. 09:19 -0700, skrev Dupuis:
>> Would itbe possible to implement one of those mechanisms in Octave ? The
>> problem I don't see a solution at present is passing multiple optionnal
>> args
>> of the same type, with different roles, in a free-form fashion.
> We already have default arguments. The following gives an example
> 
> function hello (who = "World")
>   printf("Hello, %s\n", who);
> endfunction
> 
>>> hello()
> Hello, World
>>> hello("Wonderful World")
> Hello, Wonderful World
> 
> 
Hey ! But this is exactly what I ask for ! Since how long is it implemented
?

Regards

Pascal
-- 
View this message in context: 
http://www.nabble.com/functions-with-%27named%27-arguments-tp16095584p16116519.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]