Mercurial > octave
diff src/variables.cc @ 4954:ed0f3cb6d3d4
[project @ 2004-09-01 21:24:53 by jwe]
author | jwe |
---|---|
date | Wed, 01 Sep 2004 21:24:54 +0000 |
parents | bdb307dc8613 |
children | 0ab18cbe8b5f |
line wrap: on
line diff
--- a/src/variables.cc Wed Sep 01 21:10:28 2004 +0000 +++ b/src/variables.cc Wed Sep 01 21:24:54 2004 +0000 @@ -662,6 +662,16 @@ return retval; } +std::string +unique_symbol_name (const std::string& basename) +{ + // XXX FIXME XXX Can we be smarter than just adding characters? + std::string name = basename; + while (symbol_exist (name, "any")) + name.append ("X"); + return name; +} + DEFUN (exist, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} exist (@var{name}, @var{type})\n\ @@ -1897,6 +1907,13 @@ } \ while (0) + +bool +clear_function (const std::string& nm) +{ + return do_clear_function (nm); +} + DEFCMD (clear, args, , "-*- texinfo -*-\n\ @deffn {Command} clear [-x] pattern @dots{}\n\