NAME
MultiSet — Take list and copy values to variables, like lassign.
SYNOPSIS
MultiSet VarNameList ?ValueList?
DESCRIPTION
Return Value
List of values for each variable.
Arguments
VarNameListEvery element except last is name of the name of a variable to assign to. Last element is a list of values to assign.
ValueListOptional. List of values to assign. First value will be assigned to first variable, etc.
More Info
This command is very much like lassign but is for situations for where you want your code to have a look-and-feel that is like set.

Note that if variables do not exist, they will be created.

As with lassign, if there are more variables than list elements then extra variables will be empty.

Unlike lassign, this return value is a list of values of each of the variables. This behavior mimics set.

As with set, it is possible to call this with no values. In that case it will return a list with the current value of each variable.

MultiSet will not complain if VarNameList is empty, but rather will return an empty list.


For information regarding exceptions / errors, see here.
EXAMPLES
% MultiSet {id name} [list 1 Adam]
1 Adam
% puts "$id $name"
1 Adam
SEE ALSO
lassign
KEYWORDS
list, modify, set, variable