Mercurial > hg > octave-lojdl
changeset 5379:27986bd3e238
[project @ 2005-06-02 18:21:20 by jwe]
author | jwe |
---|---|
date | Thu, 02 Jun 2005 18:21:20 +0000 |
parents | b2a5596a3f7b |
children | 1eb29d3bed2b |
files | liboctave/Array.cc liboctave/ChangeLog |
diffstat | 2 files changed, 18 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -3027,14 +3027,24 @@ if (k < rhs_dims.length ()) new_dims(i) = rhs_dims(k++); else + new_dims(i) = 1; + } + else + { + octave_idx_type nelem = idx(i).capacity (); + + if (nelem >= 1 + && k < rhs_dims.length () && nelem == rhs_dims(k)) + k++; + else if (nelem != 1) { (*current_liboctave_error_handler) - ("A(IDX-LIST) = RHS: A previously undefined and more colons in IDX-LIST than dimensions for RHS"); + ("A(IDX-LIST) = RHS: mismatched index and RHS dimension"); return retval; } + + new_dims(i) = idx(i).max () + 1; } - else - new_dims(i) = idx(i).max () + 1; } } else