diff src/pt-assign.cc @ 5794:1138ced03f14

[project @ 2006-05-08 20:23:04 by jwe]
author jwe
date Mon, 08 May 2006 20:23:07 +0000 (2006-05-08)
parents ace8d8d26933
children fb4dea2184bf
line wrap: on
line diff
--- a/src/pt-assign.cc
+++ b/src/pt-assign.cc
@@ -39,10 +39,11 @@
 #include "pt-assign.h"
 #include "pt-walk.h"
 #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;
+static bool Vprint_rhs_assign_val = false;
 
 // Simple assignment expressions.
 
@@ -342,26 +343,18 @@
   tw.visit_multi_assignment (*this);
 }
 
-static int
-print_rhs_assign_val (void)
+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")
 {
-  Vprint_rhs_assign_val = check_preference ("print_rhs_assign_val");
-
-  return 0;
+  return SET_INTERNAL_VARIABLE (print_rhs_assign_val);
 }
 
-void
-symbols_of_pt_assign (void)
-{
-  DEFVAR (print_rhs_assign_val, false, print_rhs_assign_val,
-    "-*- texinfo -*-\n\
-@defvr {Built-in Variable} print_rhs_assign_val\n\
-If the value of this variable is non-zero, Octave will print the value\n\
-of the right hand side of assignment expressions instead of the value\n\
-of the left hand side (after the assignment).\n\
-@end defvr");
-
-}
 
 /*
 ;;; Local Variables: ***