octave-maintainers
[Top][All Lists]
Advanced

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

Re: Another request for classdef test in Matlab


From: Michael Goffioul
Subject: Re: Another request for classdef test in Matlab
Date: Sat, 5 Jan 2013 18:40:06 -0500

On Sat, Jan 5, 2013 at 6:27 PM, Michael D. Godfrey <address@hidden> wrote:
On 01/05/2013 06:15 PM, Michael Goffioul wrote:
Can you run the same tests when ClassA inherits from handle? That is:

classdef ClassA < handle
   properties
     x = 1;
   end
   methods
     function obj = ClassA (x)
       if nargin > 0
         obj.x = x;
       end
     end
   end
end

Actually, that's not what I wanted to test, sorry.

With the class definition above (with handle as superclass), run the following instead:

a(2,2) = ClassA(2)
b = a
a(1,1).x, b(1,1).x
a(1,1) = ClassA(3)
a(1,1).x, b(1,1).x

Michael.


reply via email to

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