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

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

[Octave-bug-tracker] [bug #50671] Object arrays don't work correctly wit


From: Rik
Subject: [Octave-bug-tracker] [bug #50671] Object arrays don't work correctly with linear indexing
Date: Wed, 29 Mar 2017 14:49:43 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Update of bug #50671 (project octave):

                Category:         Octave Function => Interpreter            
                  Status:                    None => Confirmed              
                 Summary: Writing of property values in object arrays delets
all other property values => Object arrays don't work correctly with linear
indexing

    _______________________________________________________

Follow-up Comment #1:

Confirmed, although the actual problem is a bit different.  The problem seems
to be that the interpreter isn't handling linear indexing correctly.  See the
diary from the session below and note that linear indexing is changing the
size of the array.


octave:40> clear all
octave:41> d(1) = dummy
d =

<object array dummy>

octave:42> size (d)
ans =

   1   1

octave:43> d(1).name = "TEST"
d =

<object array dummy>

octave:44> size (d)
ans =

   1   2

octave:45> d(1).name
ans = bla
octave:46> d(2).name
ans = TEST


Note that if you use explicit ROW,COLUMN indexing then assignment works
correctly.


octave:1> clear all
octave:2> d(1,1) = dummy
d =

<object array dummy>

octave:3> size (d)
ans =

   1   1

octave:4> d(1,1).name = "TEST"
d =

<object array dummy>

octave:5> size (d)
ans =

   1   1

octave:6> d(1,1).value = pi
d =

<object array dummy>

octave:7> size (d)
ans =

   1   1

octave:8> d(1,1).name
ans = TEST
octave:9> d(1,1).value
ans =  3.1416
octave:10> diary off




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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