[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62664] assert makes function give wrong answe
From: |
Dmitri A. Sergatskov |
Subject: |
[Octave-bug-tracker] [bug #62664] assert makes function give wrong answer |
Date: |
Thu, 23 Jun 2022 16:41:16 -0400 (EDT) |
Follow-up Comment #1, bug #62664 (project octave):
This iis expected behavior.
octave:1> function [out1, out2, out3, out4] = foo (in1, in2, in3, in4)
> out1 = in1;
out2 = in2;
out3 = in3;
out4 = in4;
end
octave:2> [y1, y2, y3, y4] = foo (1, 2, 3, 4)
y1 = 1
y2 = 2
y3 = 3
y4 = 4
octave:3> foo (1, 2, 3, 4)
ans = 1
Since you did not requests all 4 outputs, it returns only the first one.
Dmitri.
--
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62664>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/