dict values

Gives the values of a dict, or the values that match a glob pattern.

dict values DICT ?PATTERN?

Description

Gives a list of the values of DICT in the order of their keys. With PATTERN it gives only the values that match it, with the rules of string match.

Arguments

ArgumentTypeDefaultDescription
DICTdictrequiredThe dict.
PATTERNglob patternnoneA pattern for the values.

Returns

A list of values.

Examples

% dict values {a 1 b 2 c 12}
1 2 12

% dict values {a 1 b 2 c 12} 1*
1 12

Errors

% dict values x
missing value to go with key
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.1

See also