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: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #47755] Access to object arrays
Date: Mon, 25 Apr 2016 14:31:17 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36

Update of bug #47755 (project octave):

                Category:                    None => Interpreter            
              Item Group:                    None => Regression             
                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #2:

I can confirm the output of the original post and #1. Furthermore it should
return the vector [1, 2] in any case.


>> ver
[snip]
MATLAB Version: 9.0.0.341360 (R2016a)
[snip]
Operating System: Linux 4.5.0-3-default #1 SMP PREEMPT Mon Mar 28 07:27:57 UTC
2016 (8cf0ce6) x86_64
[snip]

>> a.myprop
ans =
     1     2

>> a.myprop()
ans =
     1     2

>> myprop(a)
ans =
     1     2


The Octave's classdef implementation seems to be close to the behavior of a
struct.

Matlab produces:

>> b = [struct('prop', 1), struct('prop',2)]
b = 
1x2 struct array with fields:
    prop

>> b.prop
ans =
     1

ans =
     2


Octave produces:

>> b = [struct('prop', 1), struct('prop',2)]
b =

  1x2 struct array containing the fields:

    prop

>> b.prop
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]