beetlebug▾
/

tsv append

Adds text to the end of an element of a shared array.

tsv::append ARRAY ELEMENT VALUE ?VALUE ...?

Description

The command tsv::append adds each VALUE to the end of the text of the element and gives the new text. An element that does not exist starts empty.

Arguments

ArgumentTypeDefaultDescription
ARRAYarray namerequiredThe name of the shared array.
ELEMENTstringrequiredThe name of the element.
VALUEstringrequiredText to add.

Returns

The new text.

Examples

% tsv::append c t ab
ab

% tsv::append c2 t ab
> tsv::append c2 t cd ef
abcdef

Errors

% tsv::append
wrong # args: should be "tsv::append array key ?args?"
-errorcode TCL WRONGARGS

% tsv::append c t
wrong # args: should be "tsv::append c t value ?value ...?"
-errorcode TCL WRONGARGS

Facts

Capability
thread. A new interpreter does not have it until the host turns it on.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.1

See also