Difference between revisions of "NameSpace push"
From Wiki
Line 7: | Line 7: | ||
=== Description === | === Description === | ||
− | ''(Added in 1.40)'' The '''[[ | + | ''(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 [[ | + | The default [[Documentation#Namespace|Namespace]] is [[Namespace local|local]] and named STD. This setting is restored when the script is stopped. |
Revision as of 23:18, 16 August 2005
nameSpace push
Namespace commands
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
nameSpace local | nameSpace global | nameSpace clear | nameSpace pop | nameSpace copy | #nsType | #nsName |
Main_Page | Documentation |