Posted to tcl by kbk at Thu Sep 30 15:59:01 GMT 2010view raw
- proc myincr {dict key1 args} {
- upvar 1 $dict theDict
- dict update theDict $key1 theElement {
- if {[llength $args == 0]} {
- incr theElement
- } elseif {[llength $args == 1]} {
- incr theElement [lindex $args 0]
- } else {
- myincr theElement {*}$args
- }
- }
- }