# HG changeset patch # User jwe # Date 1150213947 0 # Node ID a4dc99e7175228b1c438590217539d7f634a1fad # Parent 92d2be71e7cc0cb292e8c67d467479775eb6e8b9 [project @ 2006-06-13 15:52:27 by jwe] diff -r 92d2be71e7cc -r a4dc99e71752 src/ChangeLog --- a/src/ChangeLog Tue Jun 13 04:59:31 2006 +0000 +++ b/src/ChangeLog Tue Jun 13 15:52:27 2006 +0000 @@ -1,5 +1,13 @@ 2006-06-13 John W. Eaton + * 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. diff -r 92d2be71e7cc -r a4dc99e71752 src/DLD-FUNCTIONS/fsolve.cc --- a/src/DLD-FUNCTIONS/fsolve.cc Tue Jun 13 04:59:31 2006 +0000 +++ b/src/DLD-FUNCTIONS/fsolve.cc Tue Jun 13 15:52:27 2006 +0000 @@ -29,6 +29,7 @@ #include #include +#include #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; } diff -r 92d2be71e7cc -r a4dc99e71752 src/ov-usr-fcn.cc --- a/src/ov-usr-fcn.cc Tue Jun 13 04:59:31 2006 +0000 +++ b/src/ov-usr-fcn.cc Tue Jun 13 15:52:27 2006 +0000 @@ -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 ();