[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64783] Default number of output arguments not
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #64783] Default number of output arguments not 1 for anonymous functions |
Date: |
Tue, 30 Jan 2024 13:31:01 -0500 (EST) |
Update of bug#64783 (group octave):
Item Group: Matlab Compatibility => Incorrect Result
_______________________________________________________
Follow-up Comment #2:
It seems to only be a problem if nargout for the anonymous function call is
0:
octave:1> version
ans = 8.4.0
octave:2> a=struct('re',{1,2},'im',{3,4});
octave:3> f=@(x) x.re
f =
@(x) x.re
octave:4> x = f(a)
x = 1
octave:5> [x,y] = deal (f(a))
x = 1
y = 2
octave:6> [x,y] = f(a)
x = 1
y = 2
So it looks like we are just incorrectly displaying (or capturing) all the
values in the comma-separated list in this case instead of just the first.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64783>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/