[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58695] Array is left empty if an element is a
From: |
Kai Torben Ohlhus |
Subject: |
[Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing |
Date: |
Wed, 8 Jul 2020 23:17:46 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 |
Follow-up Comment #16, bug #58695 (project octave):
I would favor more Matlab compatibility in this case, too, as pointed out on
the mailing-list.
https://lists.gnu.org/archive/html/octave-maintainers/2020-07/msg00022.html
First I thought this one was fixed alongside with bug #58686, but now I see
the slight difference, if the function has no return value at all, no error is
thrown in some cases.
>> function f1 (), end
>> function f2 (), 1; end
>> f1
>> f2
>> x = f1
error: value on right hand side of assignment is undefined
>> x = f2
error: value on right hand side of assignment is undefined
>> [1, f1, 2]
ans =
1 2
>> [1, f2, 2]
ans =
1 2
I want to see errors or warnings if I do stupid things 😊 And assigning
something to an array, where it is impossible to include anything, looks like
a programming error or an undesired/unexpected behavior to me.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58695>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, (continued)
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, Fernando, 2020/07/04
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, John W. Eaton, 2020/07/07
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, Fernando, 2020/07/08
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, John W. Eaton, 2020/07/08
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, Fernando, 2020/07/08
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, John W. Eaton, 2020/07/08
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, Fernando, 2020/07/08
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, Fernando, 2020/07/08
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, John W. Eaton, 2020/07/08
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, Fernando, 2020/07/08
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing,
Kai Torben Ohlhus <=
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, John W. Eaton, 2020/07/09
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, Fernando, 2020/07/09
- [Octave-bug-tracker] [bug #58695] Array is left empty if an element is a function call returning nothing, Rik, 2020/07/10