octave-maintainers
[Top][All Lists]
Advanced

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

Re: Can someone test this for me in MATLAB?


From: Michael Goffioul
Subject: Re: Can someone test this for me in MATLAB?
Date: Thu, 3 Jan 2013 21:25:23 -0500

On Thu, Jan 3, 2013 at 9:22 PM, Michael Goffioul <address@hidden> wrote:
I'm also wondering how MATLAB behaves with class inheritance and file modifications. Let's say you have the following classes (in separate files):

classdef ClassA < handle
  methods
    function out = m1 (obj)
      out = 1;
    end
  end
end

classdef ClassB < ClassA
  methods
    function out = m1 (obj)
      out = 0;
    end
  end
end

Then at MATLAB prompt, you type: ?ClassB

Then you modify ClassA and tag m1 as Sealed, that is:

classdef ClassA < handle
  methods (Sealed)
    function out = m1 (obj)
      out = 1;
    end
  end
end

I forgot to mention here: after the modifications, you try again "?ClassB". If MATLAB does not complain, try to create an object of ClassB. If it still does not complain, try to call method m1 on created object.

You can also exit MATLAB and restart it. Leave the modification in ClassA and do the same tests as above.

Michael.


reply via email to

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