diff src/ov-usr-fcn.cc @ 6657:86354a8cd6a7

[project @ 2007-05-23 04:35:04 by jwe]
author jwe
date Wed, 23 May 2007 04:35:04 +0000
parents fc0218995ee7
children 93c65f2a5668
line wrap: on
line diff
--- a/src/ov-usr-fcn.cc	Tue May 22 21:20:58 2007 +0000
+++ b/src/ov-usr-fcn.cc	Wed May 23 04:35:04 2007 +0000
@@ -356,7 +356,14 @@
     unwind_protect_bool (evaluating_function_body);
     evaluating_function_body = true;
 
-    cmd_list->eval ();
+    if (is_inline_function ())
+      {
+	assert (cmd_list->length () == 1);
+
+	retval = cmd_list->eval (false, nargout);
+      }
+    else
+      cmd_list->eval ();
 
     if (echo_commands)
       print_code_function_trailer ();
@@ -375,7 +382,7 @@
     
     // Copy return values out.
 
-    if (ret_list)
+    if (ret_list && ! is_inline_function ())
       {
 	ret_list->initialize_undefined_elements (my_name, nargout, Matrix ());