From: Zoran V. <zv...@ar...> - 2005-05-26 16:22:22
|
Am 26.05.2005 um 18:08 schrieb Zoran Vasiljevic: >> proc ns_proc {name spec body} { >> proc $name {args} " >> ns_parseargs $spec \$args >> $body >> " >> } >> >> ns_proc ex2 {-a {-b ""} -- x {y Y} args} { >> if {[info exists a]} { >> return [list $a $b $x $y $args] >> } >> return [list $b $x $y $args] >> } > Ah.. you ment overriding "proc" itself? So, instead of saying proc myproc {arg1 arg2 args} { .... } one can also say: proc myproc {-a {-b ""} -- x {y Y} args} { .... } So, in fact the "proc" becomes more clever? Zoran |