Mercurial > hg > octave-nkf
changeset 5750:bd9cd65d51e4
[project @ 2006-04-11 18:43:25 by jwe]
author | jwe |
---|---|
date | Tue, 11 Apr 2006 18:43:25 +0000 |
parents | 26beffa9f66f |
children | 02c7e288f581 |
files | scripts/ChangeLog scripts/miscellaneous/dir.m src/ChangeLog src/defun.cc src/pt-assign.cc |
diffstat | 5 files changed, 34 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2006-04-10 John W. Eaton <jwe@octave.org> + + * miscellaneous/dir.m: Ensure that returned structure array is + Nx1, not 1xN. + 2006-04-06 Olli Saarela <olli.saarela@kcl.fi> * plot/hist.m: Ignore NaN in inputs.
--- a/scripts/miscellaneous/dir.m +++ b/scripts/miscellaneous/dir.m @@ -98,11 +98,11 @@ else [dummy, fn, ext] = fileparts (fn); fn = strcat (fn, ext); - info(i).name = fn; - info(i).date = strftime ("%d-%b-%Y %T", localtime (st.mtime)); - info(i).bytes = st.size; - info(i).isdir = st.modestr(1) == "d"; - info(i).statinfo = st; + info(i,1).name = fn; + info(i,1).date = strftime ("%d-%b-%Y %T", localtime (st.mtime)); + info(i,1).bytes = st.size; + info(i,1).isdir = st.modestr(1) == "d"; + info(i,1).statinfo = st; endif endfor endif
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-04-11 John W. Eaton <jwe@octave.org> + + * pt-assign.cc (tree_simple_assignment::rvalue, + tree_multi_assignment::rvalue): + Error if RHS is a comma-separated list. + 2006-04-07 John W. Eaton <jwe@octave.org> * defaults.cc (FOCTAVE_VERSION): New function to replace
--- a/src/defun.cc +++ b/src/defun.cc @@ -58,7 +58,7 @@ { OSSTREAM buf; - buf << "\n*** " << nm << ":\n\n"; + buf << "\nInvalid call to " << nm << ". Correct usage is:\n\n"; h = extract_help_from_dispatch (nm) + h;
--- a/src/pt-assign.cc +++ b/src/pt-assign.cc @@ -93,6 +93,11 @@ error ("value on right hand side of assignment is undefined"); eval_error (); } + else if (rhs_val.is_cs_list ()) + { + error ("invalid assignment of comma-separated list"); + eval_error (); + } else { octave_lvalue ult = lhs->lvalue (); @@ -218,6 +223,7 @@ { error ("value on right hand side of assignment is undefined"); eval_error (); + return retval; } else { @@ -231,9 +237,9 @@ if (tmp.is_cs_list ()) { - rhs_val = tmp.list_value (); - - n = rhs_val.length (); + error ("invalid assignment of comma-separated list"); + eval_error (); + return retval; } } @@ -250,7 +256,10 @@ octave_lvalue ult = lhs_elt->lvalue (); if (error_state) - eval_error (); + { + eval_error (); + break; + } else if (k < n) { ult.assign (etype, rhs_val(k)); @@ -267,7 +276,10 @@ error ("element number %d undefined in return list", k+1); if (error_state) - eval_error (); + { + eval_error (); + break; + } else if (print_result ()) { if (Vprint_rhs_assign_val)