Posted to tcl by daedra at Thu Jul 21 09:21:43 GMT 2011view raw
- set nargs [llength $argv]
- if {$nargs == 0} {
- func $arg1 $arg2
- }
- proc func {apps sections args} {
- if { [func2 $arg1 $arg2 $args] == 0 } {
- error "did not succeed"
- }
- }
- proc func2 {apps sections args} {
- set nargs [llength $args]
- if {$args == "{}"} { set nargs 0 }
- if {$nargs == 0} {
- blah
- exit 1
- } elseif {$nargs == 1} {
- bloo
- exit 0
- }
- }