diff src/pt-assign.cc @ 5841:fb4dea2184bf

[project @ 2006-06-05 20:59:25 by jwe]
author jwe
date Mon, 05 Jun 2006 20:59:25 +0000
parents 1138ced03f14
children db0598f94c0f
line wrap: on
line diff
--- a/src/pt-assign.cc	Thu Jun 01 22:08:00 2006 +0000
+++ b/src/pt-assign.cc	Mon Jun 05 20:59:25 2006 +0000
@@ -41,10 +41,6 @@
 #include "utils.h"
 #include "variables.h"
 
-// TRUE means print the right hand side of an assignment instead of
-// the left.
-static bool Vprint_rhs_assign_val = false;
-
 // Simple assignment expressions.
 
 tree_simple_assignment::~tree_simple_assignment (void)
@@ -118,25 +114,19 @@
 
 		      if (print_result ())
 			{
-			  if (Vprint_rhs_assign_val)
-			    retval.print_with_name (octave_stdout,
-						    lhs->str_print_code ());
-			  else
-			    {
-			      // We clear any index here so that we can
-			      // get the new value of the referenced
-			      // object below, instead of the indexed
-			      // value (which should be the same as the
-			      // right hand side value).
+			  // We clear any index here so that we can
+			  // get the new value of the referenced
+			  // object below, instead of the indexed
+			  // value (which should be the same as the
+			  // right hand side value).
 
-			      ult.clear_index ();
+			  ult.clear_index ();
 
-			      octave_value lhs_val = ult.value ();
+			  octave_value lhs_val = ult.value ();
 
-			      if (! error_state)
-				lhs_val.print_with_name (octave_stdout,
-							 lhs->name ());
-			    }
+			  if (! error_state)
+			    lhs_val.print_with_name (octave_stdout,
+						     lhs->name ());
 			}
 		    }
 		  else
@@ -283,25 +273,18 @@
 		    }
 		  else if (print_result ())
 		    {
-		      if (Vprint_rhs_assign_val)
-			retval(k).print_with_name
-			  (octave_stdout, lhs_elt->str_print_code ());
-		      else
-			{
-			  // We clear any index here so that we can
-			  // get the new value of the referenced
-			  // object below, instead of the indexed
-			  // value (which should be the same as the
-			  // right hand side value).
+		      // We clear any index here so that we can get
+		      // the new value of the referenced object below,
+		      // instead of the indexed value (which should be
+		      // the same as the right hand side value).
 
-			  ult.clear_index ();
+		      ult.clear_index ();
 
-			  octave_value lhs_val = ult.value ();
+		      octave_value lhs_val = ult.value ();
 
-			  if (! error_state)
-			    lhs_val.print_with_name (octave_stdout,
-						     lhs_elt->name ());
-			}
+		      if (! error_state)
+			lhs_val.print_with_name (octave_stdout,
+						 lhs_elt->name ());
 		    }
 		}
 	      else
@@ -343,19 +326,6 @@
   tw.visit_multi_assignment (*this);
 }
 
-DEFUN (print_rhs_assign_val, args, nargout,
-  "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {@var{val} =} print_rhs_assign_val ()\n\
-@deftypefnx {Built-in Function} {@var{old_val} =} print_rhs_assign_val (@var{new_val})\n\
-Query or set the internal variable that controls whether Octave will\n\
-print the value of the right hand side of assignment expressions\n\
-instead of the value of the left hand side (after the assignment).\n\
-@end deftypefn")
-{
-  return SET_INTERNAL_VARIABLE (print_rhs_assign_val);
-}
-
-
 /*
 ;;; Local Variables: ***
 ;;; mode: C++ ***