# HG changeset patch # User John W. Eaton # Date 1247076413 14400 # Node ID 86eb5ff921d03252fac3c147e266ee1553ef509f # Parent 434ae96dc10f1bb22a54021a1a812b643c112f94 pt-assign.cc (maybe_warn_former_built_in_variable): improve message diff -r 434ae96dc10f -r 86eb5ff921d0 src/ChangeLog --- a/src/ChangeLog Wed Jul 08 13:49:21 2009 -0400 +++ b/src/ChangeLog Wed Jul 08 14:06:53 2009 -0400 @@ -1,3 +1,7 @@ +2009-07-08 John W. Eaton + + * pt-assign.cc (maybe_warn_former_built_in_variable): Improve message. + 2009-07-04 Jaroslav Hajek * pt-eval.cc (do_unwind_protect_cleanup_code): Add missing diff -r 434ae96dc10f -r 86eb5ff921d0 src/pt-assign.cc --- a/src/pt-assign.cc Wed Jul 08 13:49:21 2009 -0400 +++ b/src/pt-assign.cc Wed Jul 08 14:06:53 2009 -0400 @@ -153,9 +153,13 @@ } if (vars.find (nm) != vars.end ()) - warning_with_id ("Octave:built-in-variable-assignment", - "%s is no longer a built-in variable; please read the NEWS file or type `news' for details", - nm.c_str ()); + { + const char *nm_c_str = nm.c_str (); + + warning_with_id ("Octave:built-in-variable-assignment", + "%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\"", + nm_c_str, nm_c_str, nm_c_str, nm_c_str); + } } tree_simple_assignment::tree_simple_assignment