(Bad) sample:
proc MyTPS { args } {
set mode [keylget args MODE]
switch -exact — $mode {
start {
return “” ;# Nothing specific
}
run {
# do something
return “{CONTINUE $mh}”
}
default {
return “” ;# don’t know what to do
}
}
}
IMHO any return command from within switch command should omitted, as the switch construct is not finished! It should look like this (good sample):
proc MyTPS { args } {
set mode [keylget args MODE]
set dispList {}
switch -exact — $mode {
start {
# Nothing specific
}
run {
# do something …
lappend dispList “CONTINUE $mh”
}
default {
;# don’t know what to do
}
}
return $displist
}
Am I wrong, or can the first example create an issue?
All replies are appreciated.