[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62418] inputParser fails because of function
From: |
Georg Wiora |
Subject: |
[Octave-bug-tracker] [bug #62418] inputParser fails because of function not returning argument |
Date: |
Thu, 5 May 2022 10:23:07 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62418>
Summary: inputParser fails because of function not returning
argument
Project: GNU Octave
Submitted by: gwiora
Submitted on: Thu 05 May 2022 04:23:05 PM CEST
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Regression
Status: None
Assigned to: None
Originator Name: gwiora
Originator Email:
Open/Closed: Open
Release: 7.1.0
Discussion Lock: Any
Operating System: Microsoft Windows
_______________________________________________________
Details:
The validate_arg function fails in octave 7.1.0 at the marked position while
it worked up to 6.4
function validate_arg (this, name, val, in)
% Check validation result to be empty in case of the use of
validateattributes function
% An empty result will be interpreted as valid arguments
--> check = {val(in)};
if (~isempty(check) && ~val(in))
this.error (sprintf ("failed validation of %s with %s", toupper
(name),func2str(val)));
endif
this.Results.(name) = in;
endfunction
The reason is that _val()_ is a function handle for _validateattributes()_
that checks the validity of the _in_ parameter and does only return a result
if the test fails. If everything is ok it does not return a result.
This seems to be checked by the interpreter in the cell array operator:
_{val(in)}_ and the interpreter produces the follwoing error message:
error: validateattributes: function called with too many outputs
error: called from
validateattributes
dirPlus>@<anonymous> at line 142 column 22
validate_arg at line 507 column 15
parse at line 394 column 9
dirPlus at line 177 column 3
SPF_OctaveJobEval at line 62 column 11
stopped in validate_arg at line 507
[C:\Software\SPF_Backend_as\deployment\octave_service_image\workspace\inputParser.m]
It seems that the interpreter insists on having an output when called inside
the cell array operator. This is different from the previous behaviour.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62418>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62418] inputParser fails because of function not returning argument,
Georg Wiora <=