Mercurial > hg > octave-shane
changeset 4582:db5a24d54915
[project @ 2003-10-31 15:11:45 by jwe]
author | jwe |
---|---|
date | Fri, 31 Oct 2003 15:11:45 +0000 |
parents | f99c430316cd |
children | 70da2b8c91dd |
files | src/ChangeLog src/ov-cell.cc src/ov.cc |
diffstat | 3 files changed, 26 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2003-10-31 John W. Eaton <jwe@bevo.che.wisc.edu> + * ov-cell.cc (octave_cell::subsref): When indexing with '{', quit + early if an error occurs in do_index_op. + + * ov.cc (octave_value::next_subsref): Don't do anything if + error_state is true. + * cutils.c (octave_usleep) [HAVE_SELECT]: Introduce new local scope for declaration of delay. [HAVE_POLL]: Likewise, for delay and pfd.
--- a/src/ov-cell.cc +++ b/src/ov-cell.cc @@ -67,23 +67,26 @@ { octave_value tmp = do_index_op (idx.front ()); - Cell tcell = tmp.cell_value (); - - if (tcell.length () == 1) - retval = tcell(0,0); - else + if (! error_state) { - int nr = tcell.rows (); - int nc = tcell.columns (); - octave_value_list lst (nr * nc, octave_value ()); - int k = 0; - for (int j = 0; j < nc; j++) - for (int i = 0; i < nr; i++) - { - OCTAVE_QUIT; - lst(k++) = tcell(i,j); - } - retval = octave_value (lst, true); + Cell tcell = tmp.cell_value (); + + if (tcell.length () == 1) + retval = tcell(0,0); + else + { + int nr = tcell.rows (); + int nc = tcell.columns (); + octave_value_list lst (nr * nc, octave_value ()); + int k = 0; + for (int j = 0; j < nc; j++) + for (int i = 0; i < nr; i++) + { + OCTAVE_QUIT; + lst(k++) = tcell(i,j); + } + retval = octave_value (lst, true); + } } } break;