0
Tcl命令我想生成以下Tcl命令,參數傳遞一個樹形結構如何在層級
proc find { args } {
array set opt {-do "" -delete ""}
foreach {key value} $args {
if {![info exists opt($key)]} {
error "Wrong type '$key' The argument must have "
}
set opt($key) $value
}
if {$opt({-do) == ""} {
....
if {$opt(-value) == ""} {
..........
if {$opt(-set) == ""} {
..........
}
}
}
if {$opt({-delete) == ""} {
}
}
proc -do "I1"
proc -do "I1" -value "t" #print this results only
proc -do "I1" -value "t" -set "A" #should not touch function { proc -do "I1" -value "" }(print this results only)
proc -delete "all"
proc -delete "all" -select "I4"