Mercurial > hg > octave-avbm
changeset 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 | a4672b478cef |
children | 48d3e2d261e6 |
files | src/ChangeLog src/pt-assign.cc |
diffstat | 2 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2009-07-08 John W. Eaton <jwe@octave.org> + + * pt-assign.cc (maybe_warn_former_built_in_variable): Improve message. + 2009-07-21 Jaroslav Hajek <highegg@gmail.com> Version 3.2.2 released.
--- a/src/pt-assign.cc +++ b/src/pt-assign.cc @@ -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