[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43302] old-style class support, difference wi
From: |
Colin Macdonald |
Subject: |
[Octave-bug-tracker] [bug #43302] old-style class support, difference with matlab |
Date: |
Fri, 26 Sep 2014 09:16:40 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 |
URL:
<http://savannah.gnu.org/bugs/?43302>
Summary: old-style class support, difference with matlab
Project: GNU Octave
Submitted by: cbm
Submitted on: Fri 26 Sep 2014 09:16:39 AM GMT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
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
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43302>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #43302] old-style class support, difference with matlab,
Colin Macdonald <=