comparison src/pt-assign.cc @ 12038:bc2f0067e140 release-3-2-x

pt-assign.cc (maybe_warn_former_built_in_variable): improve message
author John W. Eaton <jwe@octave.org>
date Wed, 08 Jul 2009 14:06:53 -0400
parents 038885dcfb34
children eead00a7df05
comparison
equal deleted inserted replaced
12037:a4672b478cef 12038:bc2f0067e140
151 151
152 initialized = true; 152 initialized = true;
153 } 153 }
154 154
155 if (vars.find (nm) != vars.end ()) 155 if (vars.find (nm) != vars.end ())
156 warning_with_id ("Octave:built-in-variable-assignment", 156 {
157 "%s is no longer a built-in variable; please read the NEWS file or type `news' for details", 157 const char *nm_c_str = nm.c_str ();
158 nm.c_str ()); 158
159 warning_with_id ("Octave:built-in-variable-assignment",
160 "%s is now a function instead of a built-in variable. By assigning to %s, you have created a variable that hides the function %s. To remove the variable and restore the function, type \"clear %s\"",
161 nm_c_str, nm_c_str, nm_c_str, nm_c_str);
162 }
159 } 163 }
160 164
161 tree_simple_assignment::tree_simple_assignment 165 tree_simple_assignment::tree_simple_assignment
162 (tree_expression *le, tree_expression *re, 166 (tree_expression *le, tree_expression *re,
163 bool plhs, int l, int c, octave_value::assign_op t) 167 bool plhs, int l, int c, octave_value::assign_op t)