Mercurial > hg > octave-nkf
diff src/pt-fcn.cc @ 2601:3723512a827a
[project @ 1997-01-06 05:43:16 by jwe]
author | jwe |
---|---|
date | Mon, 06 Jan 1997 05:44:24 +0000 |
parents | 64f403ef483d |
children | 7e641ec64694 |
line wrap: on
line diff
--- a/src/pt-fcn.cc +++ b/src/pt-fcn.cc @@ -315,6 +315,14 @@ goto abort; } + if (ret_list && Vdefine_all_return_values) + { + octave_value tmp = builtin_any_variable ("default_return_value"); + + if (tmp.is_defined ()) + ret_list->initialize_undefined_elements (tmp); + } + // The following code is in a separate scope to avoid warnings from // G++ about `goto abort' crossing the initialization of some // variables. @@ -350,16 +358,7 @@ // Copy return values out. if (ret_list) - { - if (nargout > 0 && Vdefine_all_return_values) - { - octave_value tmp = builtin_any_variable ("default_return_value"); - if (tmp.is_defined ()) - ret_list->initialize_undefined_elements (tmp); - } - - retval = ret_list->convert_to_const_vector (vr_list); - } + retval = ret_list->convert_to_const_vector (vr_list); else if (Vreturn_last_computed_value) retval(0) = last_computed_value; }