NameSpace clear

From Wiki
Revision as of 00:25, 29 November 2005 by Kedrick Valorite (Talk | contribs) (fixed note)

Jump to: navigation, search


Synopsis

nameSpace clear

Description

(Added in 1.39) The Namespace clear command clears every variables within the current Namespace.

The default Namespace is local and named STD. This setting is restored when the script is stopped.


Note: Global namespaces are only available in EasyUO 1.5.

Example

set !return ; make sure !return is empty
gosub test
display ok !return
halt

sub test
	nameSpace Push ; saves current namespace
	nameSpace Local Test ; create a new temporary namespace to work with
	set !return this_is_a_test
	nameSpace Pop ; restore previous namespace
	nameSpace Copy ret* From Local Test ; copy variables to the original namespace
	nameSpace Push ; saves current namespace
	nameSpace Local Test
	nameSpace Clear ; free memory used by temporary namespace
	nameSpace Pop ; restore previous namespace
return


See also

Main Page Documentation