[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Which behavior should I expect when using inputParser?
From: |
Damian |
Subject: |
Which behavior should I expect when using inputParser? |
Date: |
Tue, 17 Jun 2014 09:04:23 +0200 |
Hello,
Recently I run into some unexpected (for me) behavior when using
inputParser. Here is the example:
p = inputParser;
p.FunctionName = 'my_function;
p.CaseSensitive = true;
p.KeepUnmatched = true;
p = p.addOptional('local', 0, @isnumeric);
test = {'local', 15};
res = p.parse(test{:})
After executing this code, the parameter 'local' appears as unmatched,
even though is passed as parameter.
If I change the KeepUnmatched attribute to 'false' I get an error
saying that an unmatched parameter was found (namely 'local').
I would expect the 'local' parameter specified in 'test' to be parsed
without a problem. Am I missing something?
I'm using Octave version 3.6.4.
Thanks in advance,
Damian.
- Which behavior should I expect when using inputParser?,
Damian <=
- Re: Which behavior should I expect when using inputParser?, Juan Pablo Carbajal, 2014/06/17
- Re: Which behavior should I expect when using inputParser?, Damian, 2014/06/17
- Re: Which behavior should I expect when using inputParser?, Juan Pablo Carbajal, 2014/06/17
- Re: Which behavior should I expect when using inputParser?, Damian, 2014/06/18
- Re: Which behavior should I expect when using inputParser?, Juan Pablo Carbajal, 2014/06/18
- Re: Which behavior should I expect when using inputParser?, Damian, 2014/06/18
- Re: Which behavior should I expect when using inputParser?, Juan Pablo Carbajal, 2014/06/18