bugGNU Octave - Bugs: bug #43302, old-style class support,...

 
 

bug #43302: old-style class support, difference with matlab

Submitter:  Colin Macdonald <cbm>
Submitted:  Fri 26 Sep 2014 09:16:39 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 26 Sep 2014 11:38:17 AM UTC, comment #1: 

Thanks for your bug report. We generally don't consider Octave features that do not work in Matlab to be bugs worth fixing. If Matlab script does not work in Octave, that is usually a bug worth fixing, but not the other way around.

Mike Miller <mtmiller>
Group Member
Fri 26 Sep 2014 09:16:39 AM UTC, original submission:  

Somestimes classes written in Octave that work in Octave don't work in Matlab.  Probably fixing such things is not a high priority for us, compared to the other way around!

But anyway, here is one example.  Sorry don't have time at the moment to prepare a proper test case but wanted to record this while I'm thinking about it.
This works:


class A:
  <variables>
  value
  <methods>
  numel: 1
  subsref: written to give dot access to "value"


Now consider "x = A(10); x.value".  This works great, returns 10.

Now make class B, same except numel is 2 (or anything not 1).

"x = B(10); x.value".  In Octave this returns 10, which seems reasonable.

But Matlab would give an error in the B case.

There is a discussion here:

http://www.mathworks.com/matlabcentral/answers/101955-why-do-i-receive-errors-when-overloading-subsref-for-types-and-for-matlab-classes

Colin Macdonald <cbm>

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by cbm (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-09-26 mtmiller StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code