Difference between revisions of "NameSpace pop"

From Wiki
Jump to: navigation, search
m (Synopsis)
(Applying templates (header, body, footer))
Line 1: Line 1:
__NOTOC__
+
{{command header|Namespace Commands}}
== nameSpace pop ==
+
'''Namespace commands'''
+
  
=== Synopsis ===
+
{{body|nameSpace pop|The namespace pop command restores the current namespace name and scope from an internal stack.
nameSpace pop
+
  
=== Description ===
+
The default namespace is named STD and has local scope. This namespace is restored when the script is stopped, or there are no previous namespaces defined at the point that a nameSpace pop occurs.}}
The namespace pop command restores the current namespace name and scope from an internal stack.
+
 
+
The default namespace is named STD and has local scope. This namespace is restored when the script is stopped, or there are no previous namespaces defined at the point that a nameSpace pop occurs.
+
  
 
==== Example ====
 
==== Example ====
Line 30: Line 24:
 
return</pre>
 
return</pre>
  
=== See Also ===
+
 
{|
+
{{footer}}
| Width=200px | [[nameSpace local]] || Width=200px | [[nameSpace global]] || Width=200px | [[nameSpace clear]] || Width=200px | [[nameSpace push]] || 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:38, 26 September 2005


Synopsis

nameSpace pop

Description

The namespace pop command restores the current namespace name and scope from an internal stack.

The default namespace is named STD and has local scope. This namespace is restored when the script is stopped, or there are no previous namespaces defined at the point that a nameSpace pop occurs.

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