rset Tcl Command

NAME

rset - assign data structure elements to variables

SYNOPSIS

dmh::rset data names

DESCRIPTION

This command is used to assign the elements of a data structure to named variables. The command recurses the structure of the names argument making assignments of the corresponding elements of the data argument. If there are more names than data elements the values are set to empty strings. The command is a convenient and efficient alternative to using lindex and/or other list manipulations. For example:

rset {1 2 3} {a b c}
# $a is 1, $b is 2, ...
rset {{1.1 1.2 1.3} 2 {3.1 3.2}} {{a b c} d {e f}}
# $a is 1.1, $b is 1.2, $f is 3.2,....

The command is equivalent to vset if the names argument is a list of names.

AUTHOR

Ed Hume, Hume Integration Software

SEE ALSO

vsetsetlindex

KEYWORDS

list