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

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

[Octave-bug-tracker] [bug #58411] cellfun with "ErrorHandler" returns wr


From: Muhali
Subject: [Octave-bug-tracker] [bug #58411] cellfun with "ErrorHandler" returns wrong message
Date: Wed, 20 May 2020 08:28:56 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0

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

                 Summary: cellfun with "ErrorHandler" returns wrong message
                 Project: GNU Octave
            Submitted by: muhali
            Submitted on: Wed 20 May 2020 05:28:54 AM PDT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 6.0.90
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

in continuation of bug #58280: the code


function varargout = foo (S, varargin)
   S.message
   for i = 1 : nargout
      varargout{i} = NaN ;
   endfor
endfunction
cellfun ("factorial", {1,2,-3}, "ErrorHandler", @foo)


returns with ovtave-5

ans = factorial: all N must be real non-negative integers
ans =

    1.0000e+00    2.0000e+00   2.5233e-310


whereas octave-6 returns

ans = 
ans =

    1.0000e+00    2.0000e+00   2.5233e-310


so the message is gone.

Moreover, the output of cellfun is only correct if I execute


fac = cellfun ("factorial", {1,2,-3}, "ErrorHandler", @foo)


which returns

fac =

     1     2   NaN





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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