[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #38261] fdisp not called for objects stored in
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #38261] fdisp not called for objects stored in structs or cell arrays |
Date: |
Tue, 05 Feb 2013 04:20:25 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20100101 Firefox/10.0.11 Iceweasel/10.0.11 |
URL:
<http://savannah.gnu.org/bugs/?38261>
Summary: fdisp not called for objects stored in structs or
cell arrays
Project: GNU Octave
Submitted by: jwe
Submitted on: Tue 05 Feb 2013 04:20:24 AM GMT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: jwe
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
Given the following simple (old-style) class definition and overloaded
methods:
% @foo/foo.m:
function obj = foo ()
obj = class (struct ('x', 13), 'foo');
end
% @foo/display.m:
function display (obj)
disp (obj.x);
end
% @foo/fdisp.m:
function fdisp (fid, obj)
fdisp (fid, obj.x);
end
(For ease of duplicating the problem, a tar file with these functions is
attached).
fdisp is not called as one might expect when an object of class foo is stored
in a struct or cell array:
octave:1> obj = foo
13
octave:2> fid = fopen ('foo.out', 'w');
octave:3> fdisp (fid, {obj})
13
octave:4> fdisp (fid, struct ('x', obj));
octave:5> fclose (fid);
This bug is why we are currently seeing output from the tests that were
recently added for concatenation of class objects with built-in types.
Further, I suspect that display and disp are not called by the interpreter as
described in the Matlab documentation.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 05 Feb 2013 04:20:24 AM GMT Name: @foo.tar Size: 10kB By: jwe
<http://savannah.gnu.org/bugs/download.php?file_id=27390>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?38261>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #38261] fdisp not called for objects stored in structs or cell arrays,
John W. Eaton <=