octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #47755] Access to object arrays


From: Guillaume
Subject: [Octave-bug-tracker] [bug #47755] Access to object arrays
Date: Thu, 21 Apr 2016 16:26:36 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

URL:
  <http://savannah.gnu.org/bugs/?47755>

                 Summary: Access to object arrays
                 Project: GNU Octave
            Submitted by: gyom
            Submitted on: Thu 21 Apr 2016 04:26:34 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: Guillaume
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

Given a class like this:


classdef myclass
  properties
    prop;
  end
  methods
    function obj = myclass(val)
      obj.prop = val;
    end
    function val = myprop(obj)
      val =[obj.prop];
    end
  end
end


create an object array:


a(1) = myclass(1);
a(2) = myclass(2);


A call to myprop() property should return [1 2] but instead it returns:


>> a.myprop
ans =  1
ans =  2





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47755>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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