Mercurial > hg > octave-lojdl
changeset 1089:7b7e58b31316
[project @ 1995-02-01 21:47:49 by jwe]
author | jwe |
---|---|
date | Wed, 01 Feb 1995 21:47:49 +0000 |
parents | 0491f3433f66 |
children | d5b0d11e3200 |
files | src/pt-exp-base.cc |
diffstat | 1 files changed, 32 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-exp-base.cc +++ b/src/pt-exp-base.cc @@ -1261,15 +1261,25 @@ if (error_state) eval_error (); - else if (nargin > 0 && all_args_defined (args)) + else if (nargin > 0) { - Octave_object tmp = id->eval (print, 1, args); - - if (error_state) - eval_error (); - else if (tmp.length () > 0) - retval = tmp(0); + if (all_args_defined (args)) + { + Octave_object tmp = id->eval (print, 1, args); + + if (error_state) + eval_error (); + else if (tmp.length () > 0) + retval = tmp(0); + } + else + { + ::error ("undefined arguments found in index expression"); + eval_error (); + } } + else + panic_impossible (); // XXX FIXME XXX -- is this correct? } } else @@ -1305,13 +1315,23 @@ if (error_state) eval_error (); - else if (nargin > 0 && all_args_defined (args)) + else if (nargin > 0) { - retval = id->eval (print, nargout, args); - - if (error_state) - eval_error (); + if (all_args_defined (args)) + { + retval = id->eval (print, nargout, args); + + if (error_state) + eval_error (); + } + else + { + ::error ("undefined arguments found in index expression"); + eval_error (); + } } + else + panic_impossible (); // XXX FIXME XXX -- is this correct? } } else