Mercurial > hg > octave-terminal
changeset 5039:8fa98abef34a
[project @ 2004-09-24 23:43:18 by jwe]
author | jwe |
---|---|
date | Fri, 24 Sep 2004 23:43:18 +0000 |
parents | fdfce0dec36b |
children | b6ff3a0d3d17 |
files | liboctave/Array.cc liboctave/ChangeLog |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -2642,7 +2642,7 @@ else if (n == 0 && m == 0) { if (! ((rhs_nr == 1 && rhs_nc == 1) - || (rhs_nr == 0 && rhs_nc == 0))) + || (rhs_nr == 0 || rhs_nc == 0))) { (*current_liboctave_error_handler) ("A([], []) = X: X must be an empty matrix or a scalar"); @@ -2780,7 +2780,7 @@ else if (len == 0) { if (! ((rhs_nr == 1 && rhs_nc == 1) - || (rhs_nr == 0 && rhs_nc == 0))) + || (rhs_nr == 0 || rhs_nc == 0))) (*current_liboctave_error_handler) ("A([]) = X: X must be an empty matrix or scalar"); } @@ -2873,7 +2873,7 @@ { if (len == 0) { - if (! (rhs_dims.all_ones () || rhs_dims.all_zero ())) + if (! (rhs_dims.all_ones () || rhs_dims.any_zero ())) { (*current_liboctave_error_handler) ("A([]) = X: X must be an empty matrix or scalar");
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2004-09-24 John W. Eaton <jwe@octave.org> + + * Array.cc (assign2, assignN): If index is empty, allow RHS to be + any empty matrix, not just []. + 2004-09-23 John W. Eaton <jwe@octave.org> * mx-ops: Include scalar zero value in type definitions.