Mercurial > hg > octave-nkf
diff src/ov-struct.cc @ 4197:40f76ce7a051
[project @ 2002-11-21 18:56:25 by jwe]
author | jwe |
---|---|
date | Thu, 21 Nov 2002 18:56:25 +0000 |
parents | 5719210fff4c |
children | 23d06c9e1edd |
line wrap: on
line diff
--- a/src/ov-struct.cc +++ b/src/ov-struct.cc @@ -331,7 +331,28 @@ gripe_failed_assignment (); } else - gripe_invalid_index_for_assignment (); + { + octave_value_list t_idx = idx.front (); + + if (t_idx.length () == 1) + { + idx_vector i = t_idx(0).index_vector (); + + Octave_map rhs_map = t_rhs.map_value (); + + if (! error_state) + { + map.assign (i, rhs_map); + + if (! error_state) + retval = octave_value (this, count + 1); + else + gripe_failed_assignment (); + } + else + error ("invalid structure assignment"); + } + } } break;