Mercurial > hg > octave-thorsten
changeset 5856:a4dc99e71752
[project @ 2006-06-13 15:52:27 by jwe]
author | jwe |
---|---|
date | Tue, 13 Jun 2006 15:52:27 +0000 |
parents | 92d2be71e7cc |
children | 6a558a8763df |
files | src/ChangeLog src/DLD-FUNCTIONS/fsolve.cc src/ov-usr-fcn.cc |
diffstat | 3 files changed, 18 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2006-06-13 John W. Eaton <jwe@octave.org> + * DLD-FUNCTIONS/fsolve.cc (hybrd_info_to_fsolve_info): + Warn about invalid values of INFO from MINPACK instead of calling + panic_impossible. + + * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): + Don't assign values returned by evaluation of cmd_list to + temporary variable. Delete unused variable last_computed_value. + * pt-stmt.cc (tree_statement_list::eval): Clear retval before each statement is evaluated.
--- a/src/DLD-FUNCTIONS/fsolve.cc +++ b/src/DLD-FUNCTIONS/fsolve.cc @@ -29,6 +29,7 @@ #include <iomanip> #include <iostream> +#include <sstream> #include "NLEqn.h" @@ -61,6 +62,7 @@ octave_idx_type hybrd_info_to_fsolve_info (octave_idx_type info) { + info = -1000; switch (info) { case -1: @@ -85,7 +87,13 @@ break; default: - panic_impossible (); + { + std::ostringstream buf; + buf << "fsolve: unrecognized value of INFO from MINPACK (= " + << info << ")"; + std::string msg = buf.str (); + warning (msg.c_str ()); + } break; }
--- a/src/ov-usr-fcn.cc +++ b/src/ov-usr-fcn.cc @@ -356,12 +356,7 @@ unwind_protect_bool (evaluating_function_body); evaluating_function_body = true; - octave_value_list tmp = cmd_list->eval (); - - octave_value last_computed_value; - - if (! tmp.empty ()) - last_computed_value = tmp(0); + cmd_list->eval (); if (echo_commands) print_code_function_trailer ();