Mercurial > hg > octave-lojdl
changeset 2115:d750e30a03e4
[project @ 1996-05-03 19:06:23 by jwe]
author | jwe |
---|---|
date | Fri, 03 May 1996 19:08:29 +0000 |
parents | a84f9c1fe38b |
children | 99658f9b74c8 |
files | src/pt-const.cc |
diffstat | 1 files changed, 36 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-const.cc +++ b/src/pt-const.cc @@ -2823,6 +2823,9 @@ void OCT_VAL_REP::set_index (const octave_value_list& args, bool rhs_is_complex) { + // XXX FIXME XXX -- it's not good that we have to list all the types + // that can be indexed here. + switch (type_tag) { case unknown_constant: @@ -2832,35 +2835,45 @@ convert_to_matrix_type (rhs_is_complex); break; + case matrix_constant: + case complex_matrix_constant: + case char_matrix_constant: + case char_matrix_constant_str: + break; + default: + ::error ("indexing %s type not implemented", type_as_string ()); break; } - int n = args.length (); - - for (int i = 0; i < n; i++) + if (! error_state) { - octave_value arg = args (i); - - switch (arg.const_type ()) + int n = args.length (); + + for (int i = 0; i < n; i++) { - case range_constant: - set_index (arg.range_value ()); - break; - - case magic_colon: - set_index (':'); - break; - - default: - set_index (arg.matrix_value ()); - break; - } - - if (error_state) - { - clear_index (); - break; + octave_value arg = args (i); + + switch (arg.const_type ()) + { + case range_constant: + set_index (arg.range_value ()); + break; + + case magic_colon: + set_index (':'); + break; + + default: + set_index (arg.matrix_value ()); + break; + } + + if (error_state) + { + clear_index (); + break; + } } } }