# # The example of the previous lesson revisited - using dicts. # proc addname {dbVar first last} { upvar 1 $dbVar db # Create a new ID (stored in the name array too for easy access) dict incr db ID set id # Create the new record dict set db $id first $firs ...
In Tcl, the evaluation of a command is done is 2 phases. The first phase is a single pass of substitutions. The second phase is the evaluation of the resulting command. Note that only one pass of substitutions is made. A command within square brackets ([]) is replaced with the return fr ...