bugGNU Octave - Bugs: bug #38374, wrong isargout with indexed cell...

 
 

bug #38374: wrong isargout with indexed cell array function handle

Submitter:  John Hunt <huntj>
Submitted:  Fri 22 Feb 2013 11:48:36 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.6.3 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 23 Feb 2013 12:26:26 AM UTC, comment #3: 

I checked in the following changeset on the default branch:

http://hg.savannah.gnu.org/hgweb/octave/rev/1785493171ac

This fix will appear in the next major release of Octave (3.8 or 4.0).

John W. Eaton <jwe>
Group administrator
Fri 22 Feb 2013 08:40:09 PM UTC, comment #2: 

I'm looking at this problem now.

John W. Eaton <jwe>
Group administrator
Fri 22 Feb 2013 08:08:19 PM UTC, comment #1: 

Interesting issue.  It affects other data structures like struct as well.  Here is a slightly reduced code example which illustrates the same problem.


octave:1> function y = f() disp (isargout (1)); y=0; endfunction
octave:2> [x] = f();
 1
octave:3> [~] = f();
0
octave:4> s.f1 = @f;
octave:5> [x] = s.f1()
 1
x = 0
octave:6> [~] = s.f1()
 1


The problem is present on the development branch as well.

Rik <rik5>
Group administrator
Fri 22 Feb 2013 11:48:36 AM UTC, original submission:  

The 6th output is wrong
same result with 3.6.4 (this version is not in the bug tracker yet)


GNU Octave, version 3.6.3
octave:1> function [a, b, c] = f() disp(isargout(2)); a=0; b=0; c=0; endfunction
octave:2> [a, b, c] = f();
1
octave:3> [a, ~, c] = f();
0
octave:4> ff = {@f}
ff =
{
  [1,1] = @f
}
octave:5> [a, b, c] = ff{1}();
1
octave:6> [a, ~, c] = ff{1}();
 1
octave:7> fff = ff{1}
fff = @f
octave:8> [a, ~, c] = fff();
0



John Hunt <huntj>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by huntj (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-02-23 jwe StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2013-02-22 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code