Mercurial > hg > octave-lyh
changeset 4756:60c78bde10e5
[project @ 2004-02-13 21:58:01 by jwe]
author | jwe |
---|---|
date | Fri, 13 Feb 2004 21:58:01 +0000 |
parents | 9a6bfff40c8d |
children | c48180a45d34 |
files | ChangeLog Makefile.in liboctave/Array.cc liboctave/ChangeLog |
diffstat | 4 files changed, 28 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-02-13 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (header-msg): Required bison version now 1.31 or later. + 2004-01-29 John W. Eaton <jwe@bevo.che.wisc.edu> * emacs/octave-mod.el: If line-end-position is not defined,
--- a/Makefile.in +++ b/Makefile.in @@ -49,7 +49,7 @@ @echo "* flex (2.5.4 or a more recent version) -- required if" @echo "* you need to recreate lex.cc from lex.l" @echo "*" - @echo "* bison (1.28 or a more recent version) -- required if" + @echo "* bison (1.31 or a more recent version) -- required if" @echo "* you need to recreate parse.cc from parse.y" @echo "*" @echo "* gperf (2.7.1 or a more recent version) -- required if"
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -1165,10 +1165,19 @@ n = nr; else { - (*current_liboctave_error_handler) - ("A(idx) = []: expecting A to be row or column vector or scalar"); - - return; + // Reshape to row vector for Matlab compatibility. + + n = nr * nc; + nr = 1; + nc = n; + + if (liboctave_wfi_flag) + { + (*current_liboctave_warning_handler) + ("A(idx) = []: expecting A to be row or column vector or scalar"); + + return; + } } if (idx_arg.is_colon_equiv (n, 1)) @@ -1214,10 +1223,7 @@ iidx++; else { - if (nr == 1) - new_data[ii] = elem (0, i); - else - new_data[ii] = elem (i, 0); + new_data[ii] = elem (i); ii++; } @@ -2629,7 +2635,9 @@ if (idx_i) { - if (len == 0) + if (rhs_nr == 0 && rhs_nc == 0) + lhs.maybe_delete_elements (idx_i); + else if (len == 0) { if (! ((rhs_nr == 1 && rhs_nc == 1) || (rhs_nr == 0 && rhs_nc == 0)))
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,9 @@ +2004-02-13 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array.cc (maybe_delete_elements_2): Allow X(n) = [] for 2-d X. + (Array<T>assign2): Also call maybe_delete_elements for single + index when rows and columns or LHS are both greater than 1. + 2004-02-13 Petter Risholm <risholm@stud.ntnu.no> * Array.cc (Array<T>::maybe_delete_elements):