Mercurial > hg > octave-lyh
changeset 1003:19d836fec1c8
[project @ 1994-12-27 02:12:05 by jwe]
author | jwe |
---|---|
date | Tue, 27 Dec 1994 02:12:05 +0000 |
parents | 9d405453900c |
children | df3c4da3adb0 |
files | src/pt-exp-base.cc |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-exp-base.cc +++ b/src/pt-exp-base.cc @@ -942,11 +942,16 @@ { int nargout = maybe_do_ans_assign ? 0 : 1; - Octave_object tmp_args; - Octave_object tmp = object_to_eval->eval (0, nargout, tmp_args); - - if (tmp.length () > 0) - retval = tmp(0); + if (nargout) + { + Octave_object tmp_args; + Octave_object tmp = object_to_eval->eval (0, nargout, tmp_args); + + if (tmp.length () > 0) + retval = tmp(0); + } + else + retval = object_to_eval->eval (0); } else eval_undefined_error ();