Mercurial > hg > octave-lojdl
changeset 6197:c67c11e22828
[project @ 2006-12-04 16:08:30 by dbateman]
author | dbateman |
---|---|
date | Mon, 04 Dec 2006 16:08:30 +0000 |
parents | 4942c93e37e3 |
children | 0b190c343471 |
files | src/ChangeLog src/data.cc |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2006-12-04 David Bateman <dbateman@free.fr> + * data.cc (Fdata): If ndims is greater than nargout and + nargout is greater than 1, then collect size of trailing + dimensions into retval(end). + * load-path.cc (load_path::do_find_fcn): Return empty string if tests fail.
--- a/src/data.cc +++ b/src/data.cc @@ -1043,6 +1043,16 @@ for (int i = nargout-1; i >= ndims; i--) retval(i) = 1; + if (ndims > nargout) + { + octave_idx_type d = 1; + + while (ndims >= nargout) + d *= dimensions(--ndims); + + retval(ndims) = d; + } + while (ndims--) retval(ndims) = dimensions(ndims); }