beetlebug▾
/

tsv keylkeys

Gives the keys of a keyed list in a shared array.

tsv::keylkeys ARRAY ELEMENT ?KEY?

Description

The command tsv::keylkeys gives the keys of the top level of the keyed list in the element, or the keys of the keyed list that is the value of KEY.

Arguments

ArgumentTypeDefaultDescription
ARRAYarray namerequiredThe name of the shared array.
ELEMENTstringrequiredThe name of the element.
KEYkey, or a path of keys with dotsnoneThe key whose value has the keys.

Returns

A list of keys.

Examples

% tsv::keylset k e name Ann a.b 1
> tsv::keylkeys k e
name a

% tsv::keylset k e name Ann a.b 1
> tsv::keylkeys k e a
b

Errors

% tsv::keylset k e name Ann
> tsv::keylkeys k e nope
key "nope" not found
-errorcode NONE

% tsv::keylkeys k
wrong # args: should be "tsv::keylkeys array key ?args?"
-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