Hi,

> How does it succeed in Matlab? This does not make sense. How can you
> skip the optional parameters and jump into param/value? How can one
> know if it's an optional parameter that does not validate or the key
> for a parameter?

If optional input is not a string it can not be a parameter name and there is 
no possibility of confusion. If optional input can be a string, then Matlab 
documentation says
http://www.mathworks.se/help/techdoc/matlab_prog/bresuxt-11.html
"If your function accepts optional input strings and parameter name and value 
pairs, specify validation functions for the optional input strings. Otherwise, 
the Input Parser interprets the optional strings as parameter names. For 
example, the checkFinish validation function ensures that printPhoto interprets 
'glossy' as a value for finish and not as an invalid parameter name."

Thus it is possible to leave out optional arguments even when using ParamValue 
arguments, too.

> By the way, if you are using octave's inputParser, take a look at
> addSwitch which matlab hasn't implemented yet.

help @inputParser/addSwitch says "See `help @inputParser' for examples.", but 
it seems it should be "See `help inputParser' for examples.", ie without @.

Aki

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to