tsv
tsv::set array element ?value?
Shared variables for threads: arrays that each thread of the process can read and change, with a lock for each command. The list commands change a list in place.
This page also has tsv::append, tsv::array, tsv::exists, tsv::get, tsv::handlers, tsv::incr, tsv::keyldel, tsv::keylget, tsv::keylkeys, tsv::keylset, tsv::lappend, tsv::lindex, tsv::linsert, tsv::llength, tsv::lock, tsv::lpop, tsv::lpush, tsv::lrange, tsv::lreplace, tsv::lsearch, tsv::lset, tsv::move, tsv::names, tsv::object, tsv::pop, tsv::set, tsv::unset.
Subcommands
| Synopsis | What it does |
|---|---|
tsv::set ARRAY ELEMENT ?VALUE? |
Sets or gives a value. |
tsv::get ARRAY ELEMENT ?VAR? |
The value. With VAR, 1 when it exists and the value in VAR. |
tsv::exists ARRAY ?ELEMENT? |
1 when it exists. |
tsv::unset ARRAY ?ELEMENT ...? |
Removes elements or the array. |
tsv::incr ARRAY ELEMENT ?N? |
Adds to an integer. |
tsv::append ARRAY ELEMENT VALUE ... |
Adds text. |
tsv::lappend ARRAY ELEMENT VALUE ... |
Adds list elements. lindex, llength, lrange, linsert, lreplace, lsearch, lset, lpush, and lpop work as the list commands. |
tsv::pop ARRAY ELEMENT |
The value, and removes it. |
tsv::move ARRAY OLD NEW |
Gives an element a new name. |
tsv::names ?PATTERN? |
The names of the arrays. |
| `tsv::array set | get |
tsv::lock ARRAY ARG ?ARG ...? |
Runs a script with the lock of the array. |
tsv::keylset ARRAY ELEMENT KEY VALUE |
Keyed lists: keylget, keylkeys, and keyldel go with it. |
tsv::object ARRAY ELEMENT |
A command for one element. |
tsv::handlers |
The names of the storage handlers. |
Facts
- Capability:
thread. A new interpreter does not have this command. See Limits and capabilities. - Compute cost: one compute unit for the call, and more for the commands that it runs.