Version 0 of dict update

Updated 2012-02-16 13:46:26 by LVwikignome
dict update dictionaryVariable key varName ?key varName ...? body

Execute the Tcl script in body with the value for each key (as found by reading the dictionary value in dictionaryVariable) mapped to the variable varName. There may be multiple key/varName pairs. If a key does not have a mapping, that corresponds to an unset varName. When body terminates, any changes made to the varNames is reflected back to the dictionary within dictionaryVariable (unless dictionaryVariable itself becomes unreadable, when all updates are silently discarded), even if the result of body is an error or some other kind of exceptional exit. The result of dict update is (unless some kind of error occurs) the result of the evaluation of body.

Each varName is mapped in the scope enclosing the dict update; it is recommended that this command only be used in a local scope (procedure, lambda term for apply, or method). Because of this, the variables set by dict update will continue to exist after the command finishes (unless explicitly unset). Note that the mapping of values to variables does not use traces; changes to the dictionaryVariable's contents only happen when body terminates.