Mercurial > hg > octave-lyh
diff src/pt-assign.cc @ 2984:84c33881d0bc
[project @ 1997-05-16 05:14:33 by jwe]
author | jwe |
---|---|
date | Fri, 16 May 1997 05:14:34 +0000 |
parents | 20f5cec4f11c |
children | aa9d0c0e0458 |
line wrap: on
line diff
--- a/src/pt-assign.cc +++ b/src/pt-assign.cc @@ -77,6 +77,9 @@ return retval; } +// XXX FIXME XXX -- this works, but it would look a little better if +// it were broken up into a couple of separate functions. + octave_value tree_simple_assignment::rvalue (void) { @@ -108,6 +111,13 @@ { ult.assign (etype, rhs_val); + // We clear any index here so that we can get the + // new value of the referenced object below, instead + // of the indexed value (which should be the same as + // the right hand side value). + + ult.clear_index (); + if (error_state) eval_error (); else if (! Vprint_rhs_assign_val) @@ -196,6 +206,9 @@ return retval; } +// XXX FIXME XXX -- this works, but it would look a little better if +// it were broken up into a couple of separate functions. + octave_value_list tree_multi_assignment::rvalue (int) { @@ -242,6 +255,15 @@ { // XXX FIXME XXX -- handle other assignment ops. ult.assign (octave_value::asn_eq, tmp); + + // We clear any index here so that we + // can get the new value of the + // referenced object below, instead of + // the indexed value (which should be + // the same as the right hand side + // value). + + ult.clear_index (); } else error ("element number %d undefined in return list", k);