Difference between revisions of "NameSpace push"

From Wiki
Jump to: navigation, search
(Description: Applying template to notes)
(Applying templates (header, body, footer))
Line 1: Line 1:
__NOTOC__
+
{{command header|Namespace Commands}}
== nameSpace push ==
+
'''Namespace commands'''
+
  
=== Synopsis ===
+
{{body|nameSpace push|''(Added in 1.40)'' The '''[[Documentation#Namespace|Namespace]]''' push commands store the current [[Documentation#Namespace|Namespace]] name and scope in an internal stack.
'''nameSpace''' push
+
  
=== Description ===
+
The default [[Documentation#Namespace|Namespace]] is [[Documentation#Namespace local|local]] and named STD. This setting is restored when the script is stopped.}}
''(Added in 1.40)'' The '''[[Documentation#Namespace|Namespace]]''' push commands store the current [[Documentation#Namespace|Namespace]] name and scope in an internal stack.
+
 
+
The default [[Documentation#Namespace|Namespace]] is [[Documentation#Namespace local|local]] and named STD. This setting is restored when the script is stopped.
+
  
  
Line 34: Line 28:
 
return</pre>
 
return</pre>
  
=== See Also ===
+
 
{|
+
{{footer}}
| Width=200px | [[nameSpace local]] || Width=200px | [[nameSpace global]] || Width=200px | [[nameSpace clear]] || Width=200px | [[nameSpace pop]] || Width=200px | [[nameSpace copy]] || Width=200px | [[Var nsType|#nsType]] || Width=200px | [[Var nsName|#nsName]]
+
|}
+
----
+
{|
+
| Width=200px | [[Main_Page]] || Width=200px | [[Documentation]] || Width=200px |
+
[[Documentation#Namespace|Namespace]]
+
|}
+

Revision as of 04:40, 26 September 2005


Synopsis

nameSpace push

Description

(Added in 1.40) The Namespace push commands store the current Namespace name and scope in an internal stack.

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


Note: Currently only Local scope is available. Global scope is to be introduced in a future version of EasyUO.


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