[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59704] function call on classdef subobject fa
From: |
Fernando |
Subject: |
[Octave-bug-tracker] [bug #59704] function call on classdef subobject fails with "numel: invalid return value" |
Date: |
Fri, 25 Dec 2020 15:11:21 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0 |
Follow-up Comment #3, bug #59704 (project octave):
I also wonder if it is correct to call the overloaded numel method here to get
the number of outputs of the sentence.
If we modify the bug59704/numel method to return the value 2, we would have:
>> o=bug59704();
>> o.p
ans = [](0x0)
>> [o.p]=size(rand(2,5))
o =
bug59704 object with properties:
p: [1x2 cs-list]
>> o.p
ans = 2
ans = 5
Initially, o.p is an empty array. However, when used as an lvalue, it acts as
a cs-list of two elements (because the numel method returned 2). As a result,
o.p ends up storing a cs-list. Is that behavior correct? I thought cs-lists
could not be stored in a variable.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59704>
_______________________________________________
Mensaje enviado vía Savannah
https://savannah.gnu.org/