Errata 10.6.1 - Basic Ensembles Fabricio Rocha - 13 Mar 2010 - The example code defines proc plus (line 2), which is never used; the usage refers to an example add subcommand, so the procedure's name should be add. 10.6.4 - Handling Unknown Ensemble Commands The original code listing is this: rename string strCore proc strReverse {string} { set result {} for {set i [strCore length $string]} {$i>0} {} { incr i -1 append result [strCore index $i] } return $result } proc unknownStrCmd {string subcommand args} { puts "Passing $subcommand through to strCore" return [list strCore $subcommand {*}$args] } namespace ensemble create -command string -map { reverse {strReverse} } -unknown unknownStrCmd Fabricio Rocha 13-Mar-2010 - It does not work. After being sourced in tclsh8.5, the script generates a number of wrong # args: should be "strCore index string charIndex" messages after the "Passing match through strCore" (which, unexpectedly, appears after ANY command is typed in tclsh). AFAIK, {expand} was officialy substituted by {*} in Tcl 8.5, but even after replacing it I could not get the example to work. Actually, I tried to execute the example because I found it strange that, according to the text, the "passing $subcommand ..." messages would appear even when strCore was called directly, without being called via the string ensemble. Lars H: It should work after removing the {expand}$args. The -unknown handler is only supposed to return the target command prefix (like one would specify in the -map dictionary), not the entire command. Fabricio Rocha - 14 Mar 2010 - The solution is more obvious than I could think of: the call to strCore at proc strReverse (line 5) is missing the string argument from which the index will refer to (the line should be append result [strCore index $string $i]). Lars, I got different results when using {*}$args and when removing it completely. Without it, the unknown procedure seems to be called three times for a string reverse abc command. When using it, I get only one message Passing match through to strCore and the string is also correctly reversed. Both behaviours are different than these pointed by the book. (Anyway, could someone explain why the Passing match through to strCore appears even when I type just exit in tclsh??) RLH You should contact Kent...but if the errata comes here...it should be on a different page. Fabricio Rocha - 14 Mar 2010 - I almost created another page, Robert, but I thought that keeping all the discussion about the book in one single page would be better (I must admit I am not aware of any rules regarding pages about books in the wiki, and I think it is something to debate...) RLH I don't really think there are rules per se. Just thought a potentially long errata page would be better served on its own page is all. See also: http://journal.dedasys.com/2009/09/15/tcl-and-the-tk-toolkit-2nd-edition