Hi,

Thanks for the informative reply. Unfortunately I don't have time and 
competence to fix octave-core bug #34478 or implement classdef.

> The code you're asking for is in the general package release (1.3.0
> released less than 1 month ago).

I have downloaded this code and experimented with it. I think I can manage with 
the current octave API for inputParser, but there is one bug and missing 
functionality in the 1.3.0 relase of inputParser.

1) Leaving out optional arguments does not work. Below is example function and 
example function calls, where latter fails in Octave, but not in Matlab.
---Clip---
function a = iptest(varargin)

   ip=inputParser;
   ip.FunctionName = 'IPTEST';
   ip=ip.addOptional('a', []);
   ip=ip.addParamValue('b',[]);
   ip=ip.parse(varargin{:});
   a=ip.Results.a;
---Clip---

octave-3.6.1:12> iptest(1,'b',2)
ans =  1
octave-3.6.1:13> iptest('b',2)
error: IPTEST : Parameter/Switch names must be strings
error: called from:
error:   /proj/bayes/ave/gpstuffbeta/octave/@inputParser/subsref.m at line 132, 
column 7
error:   /proj/bayes/ave/gpstuffbeta/octave/@inputParser/subsref.m at line 38, 
column 11
error:   /proj/bayes/ave/gpstuffbeta/octave/iptest.m at line 7, column 5

2) Matlab's inputParser accepts parameter-value pairs as a struct. It seems 
that this is not yet implemented in the 1.3.0 relase of inputParser.

We might be able to fix these, but before spending time on that, I'd like to 
know if someone has already fixed these or working on these?


Best,

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