Mercurial > hg > octave-lyh
diff src/pt-exp-base.cc @ 1089:7b7e58b31316
[project @ 1995-02-01 21:47:49 by jwe]
author | jwe |
---|---|
date | Wed, 01 Feb 1995 21:47:49 +0000 |
parents | 8c1a25cdfa81 |
children | 51fd9e40a7f7 |
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