diff src/variables.cc @ 1162:c210c5a25a48

[project @ 1995-02-27 17:36:16 by jwe]
author jwe
date Mon, 27 Feb 1995 17:38:57 +0000
parents 0326a802cd5c
children b6360f2d4fa6
line wrap: on
line diff
--- a/src/variables.cc	Mon Feb 27 16:15:02 1995 +0000
+++ b/src/variables.cc	Mon Feb 27 17:38:57 1995 +0000
@@ -1405,6 +1405,19 @@
 }
 #endif
 
+void
+bind_ans (const tree_constant& val, int print)
+{
+  static symbol_record *sr = global_sym_tab->lookup ("ans", 1, 0);
+  static tree_identifier ans_id (sr);
+
+  tree_constant *tmp = new tree_constant (val);
+
+  tree_simple_assignment_expression tmp_ass (&ans_id, tmp, 1, 1);
+
+  tmp_ass.eval (print);
+}
+
 // Give a global variable a definition.  This will insert the symbol
 // in the global table if necessary.