User manual

Series 3700 System Switch/Multimeter Reference Manual Section 2: TSP Programming Fundamentals
3700S-901-01 Rev. C / July 2008 2-31
Deleting a script from the system
To completely remove a script from the system, all references to the script will
need to be deleted from the run-time environment. A script may be removed
from the run-time environment by assigning it to nil. For example, to remove
the script named "test8" from the run-time environment, send the following code
to set test8 to a nil value:
test8 = nil
To delete a script from the script.user.scripts table, set the name
attribute to an empty string(""), which makes the script nameless. This does not
make the script become the anonymous script. For example, to remove the
script named "test8" from the script.user.scripts table, send the following
code to set the name attribute for test8 as an empty string:
script.user.scripts.test8.name = ""
Replacing, changing, or deleting a script from the run-time environment does not
remove the script from nonvolatile memory. A script can be permanently
removed from nonvolatile memory sending either of the following commands:
script.delete("name")
script.user.delete("name")
Where: name is the user-defined name of the script.
Example:
To delete a user script named "test8" from nonvolatile memory:
script.delete("test8")
Restoring a script in the run-time environment
A script is inherently a global variable that can be replaced by assigning a new
value or by loading a new script with the same name. It can also be removed
from the run-time environment by assigning it the nil value. A script can be
restored from nonvolatile memory back into the run-time environment using
either of the following commands:
script.restore("name")
script.user.restore("name")
Where: name is the user-defined name of the script to be restored.
Example:
To restore a user script named "test9" from nonvolatile memory:
script.restore("test9")