Models 707B and 708B Switching Matrix Reference Manual
Section 7: Command reference
707B-901-01 Rev. A / August 2010
7-241
Example
userstring.add("assetnumber", "236")
userstring.add("product", "Widgets")
userstring.add("contact", "John Doe")
Stores user-defined strings in nonvolatile
memory.
Also see
(on page 7-241)
userstring.catalog()
This function creates an iterator for the user string catalog.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function No
Usage
for name in userstring.catalog() do … end
name
The name of the string; the key of the key-value pair
Details
The catalog provides access for
userstring
pairs, allowing you to manipulate all the key-value pairs in
nonvolatile memory. The entries are enumerated in no particular order.
Example 1
for name in userstring.catalog() do
userstring.delete(name)
end
Deletes all user strings in nonvolatile memory.
Example 2
for name in userstring.catalog() do
print(name .. " = " ..
userstring.get(name))
end
Prints all
userstring
key-value pairs.
Output:
product = Widgets
assetnumber = 236
contact = John Doe
The above output lists the user strings added in the
example for the
userstring.add()
function.
Notice the key-value pairs are not listed in the
order they were added.
Also see
(on page 7-240)