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

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

[Octave-bug-tracker] [bug #34868] subsref crashes octave


From: Rik
Subject: [Octave-bug-tracker] [bug #34868] subsref crashes octave
Date: Wed, 23 Nov 2011 18:44:30 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0

Follow-up Comment #19, bug #34868 (project octave):

I verified the new behavior and added some %!tests for it.  I checked in JWE's
changeset here (http://hg.savannah.gnu.org/hgweb/octave/rev/6ead4dc1ca55).

Question, for subsref the returned value with an empty index is the original
matrix.  For subsasgn the returned value is what would have been assigned if
the assignment operator had not been empty.  This seems odd to me.  It seems
like it should be the original matrix again.


x = 1:5;
x([]) = 167
x =

   1   2   3   4   5

BUT

idx = struct ("type", {}, "subs", {});
subsasgn (x, idx), 167)
ans =  167


Any thoughts?


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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