/jEdit/tags/jedit-4-1-pre5/bsh/commands/unset.bsh
Unknown | 15 lines | 12 code | 3 blank | 0 comment | 0 complexity | 9432482d38db7ca13bc2c892a286c7b0 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- /**
- "Undefine" the variable specifed by 'name' (So that it tests == void).
- <p>
- <em>Note: there will be a better way to do this in the future. This is
- currently equivalent to doing namespace.setVariable(name, null);</em>
- */
- bsh.help.unset = "usage: unset( name )";
- void unset( String name ) {
- if ( arg == null )
- return;
- this.caller.namespace.setVariable(name, null);
- }