[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51633] Empty indexing of struct returns empty
From: |
Piotr Held |
Subject: |
[Octave-bug-tracker] [bug #51633] Empty indexing of struct returns empty struct array |
Date: |
Tue, 1 Aug 2017 18:26:17 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36 |
Follow-up Comment #7, bug #51633 (project octave):
jwe: I'm sorry my reponse wasn't more precise.
I agree with Dan Sebald 'x()' should be the same as 'x'.
To be more precise we have:
a = 1:10;
str = 'abcd';
myints = int32(1:10);
b(1) = struct ('x', 1:10);
b(2) = struct ('x', 11:20);
flag(1) = isequal (a,a());
flag(2) = isequal (str,str());
flag(3) = isequal (myints,myints());
flag(4) = isequal (b,b());
assert (all (flag));
So in Matlab assert passes and:
flag == [1 1 1 1];
in Octave it fails and:
flag == [1 1 1 0];
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51633>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/