octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #45837] inputParser.addParamValue: failed vali


From: Juan Pablo Carbajal
Subject: [Octave-bug-tracker] [bug #45837] inputParser.addParamValue: failed validation for empty string
Date: Mon, 31 Aug 2015 09:16:33 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36

Follow-up Comment #3, bug #45837 (project octave):

Therefore, if when the function ip_bug is called without arguments, the
validator

p.addParamValue ('Dir', def_dir, @ischar); 

gets and empty array (your default value) and it fails. This is consistent and
correct, since as you just saw [] is double not char.

Now, it might be that Matlab's inputParser is not calling the validator when
the default argument is given. I would deem that as a ML bug. Because it
allows for default initializations that cannot be passed as input arguments. 

The solution is to use consistent defautl values. in your case def_dir should
pass the validation step, therefore it should be 

+varbatim+
def_dir ="" 


or if you think that is ambiguous


def_dir = char([])





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45837>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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