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

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

[Octave-bug-tracker] [bug #62420] inputParser fails due to interpreter c


From: Georg Wiora
Subject: [Octave-bug-tracker] [bug #62420] inputParser fails due to interpreter changes in 7.1.0
Date: Fri, 6 May 2022 02:44:52 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?62420>

                 Summary: inputParser fails due to interpreter changes in
7.1.0
                 Project: GNU Octave
            Submitted by: gwiora
            Submitted on: Fri 06 May 2022 08:44:51 AM CEST
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: gwiora
        Originator Email: 
             Open/Closed: Open
                 Release: 7.1.0
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

The _validate_arg_ function as part _inputParser_ class 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. Due to changes in
octave 7.1 interpreter this is now handled as an error (see bug #62418).

There may be more functions affected by this change.





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62420>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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