[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref()
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref() in classdef methods |
Date: |
Mon, 27 Feb 2023 11:28:03 -0500 (EST) |
Follow-up Comment #9, bug #63841 (project octave):
Comment #8 (subsref works for (), not for {} or .) seems consistent with the
changeset that jwe identified by bisection. That cset begins with
+ // Attempt to set up a proper value for nargout at least in the
+ // simple case where the cs-list-type expression - i.e., {} or
+ // ().x, is the leading one.
+ bool maybe_cs_list_query = (type[0] == '.' || type[0] == '{'
+ || (type.length () > 1 && type[0] ==
'('
+ && type[1] == '.'));
+
+ if (maybe_cs_list_query)
+ {
+ // Set up a proper nargout for the subsref call by calling
numel.
+ octave_value_list tmp;
+ if (type[0] != '.') tmp = idx.front ();
+ nargout = xnumel (tmp);
+ }
The comment in the code about the variable "maybe_cs_list_query" implies that
this is about calculating the specific cases of "{}" and ".".
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63841>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63841] subsref gets wrong number of varargout elements, A.R. Burgers, 2023/02/26
- [Octave-bug-tracker] [bug #63841] nargout is always 1 for classdef methods, Rik, 2023/02/26
- [Octave-bug-tracker] [bug #63841] nargout is always 1 for classdef methods, Rik, 2023/02/26
- [Octave-bug-tracker] [bug #63841] nargout is always 1 for classdef methods, Nicholas Jankowski, 2023/02/26
- [Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref() in classdef methods, Rik, 2023/02/26
- [Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref() in classdef methods, Rik, 2023/02/26
- [Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref() in classdef methods, Rik, 2023/02/26
- [Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref() in classdef methods, anonymous, 2023/02/26
- Message not available
- [Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref() in classdef methods, John W. Eaton, 2023/02/27
- Message not available
- Message not available
- [Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref() in classdef methods, A.R. Burgers, 2023/02/27
- [Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref() in classdef methods,
Rik <=
- [Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref() in classdef methods, Rik, 2023/02/27
- [Octave-bug-tracker] [bug #63841] nargout is always 0 or 1 for subsref() in classdef methods, Rik, 2023/02/27