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	Mon Dec 26 22:01:15 1994 +0000
+++ b/src/pt-exp-base.cc	Tue Dec 27 02:12:05 1994 +0000
@@ -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 ();