[Top][All Lists]

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

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

From: Lukas Reichlin
Subject: [Octave-bug-tracker] [bug #34868] subsref crashes octave
Date: Tue, 22 Nov 2011 21:47:44 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22

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

Yes, John is correct.

I noticed that from the example below, the first is a 0x0 and the second a 1x0
struct but I believe that this difference is not important here.

octave:1> struct ('type', {}, 'subs', {})
ans =

  0x0 struct array containing the fields:


octave:2> b.type = "()";
octave:3> b.subs = {1:2};
octave:4> b(2:end)
ans =

  1x0 struct array containing the fields:



I have a remark on comment #7:
... you have not told subsref what type of indexing you are attempting or what
the values of the index are ...
There's no real indexing with this special kind of empty struct. So we don't
need to know whether the hypothetic type is "{}", "." or "()" because the
result is always the same: subsref just returns its first argument -


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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