changeset 31150:44b9673c7b8d stable

correct subsasgn docstring example code (bug #33221) * libinterp/octave-value/ov.cc (subsasgn): add LHS variable to example code in docstring reconcile example result with the following one-line command.
author Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
date Fri, 22 Jul 2022 15:30:29 -0400
parents 07e52e612ea2
children ef45a559f592
files libinterp/octave-value/ov.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov.cc	Mon Jul 18 17:29:32 2022 +0200
+++ b/libinterp/octave-value/ov.cc	Fri Jul 22 15:30:29 2022 -0400
@@ -3871,7 +3871,7 @@
 val = magic (3);
 idx.type = "()";
 idx.subs = @{":", 1:2@};
-subsasgn (val, idx, 0)
+val = subsasgn (val, idx, 0)
      @result{}  [ 0   0   6
            0   0   7
            0   0   2 ]