according to http://www.tcl.tk/man/tcl8.4/TclCmd/switch.htm this statement looks perfectly fine for me. I also tried to use ${::euroipchaos} which won't change anything. I also tried to use the variable via global and without :: within the switch structure, but still no change... it still calls default .
Last edited by De Kus on Mon Mar 14, 2005 7:56 pm, edited 4 times in total.
okay, that was a bit early... when I took a close look, I cannot get rid of this error now:
[00:34:25] #De_Kus# set errorInfo
Currently: invalid command name "bgerror"
Currently: while invoking
Currently: "unknown bgerror wrong # args: should be "switch ?switches? string pattern body ..."
The switch command can match against variables and not just literals, as shown here
Heh..that's a weird thing to say... The switch command can match against strings, not variables...variable substitution is performed BEFORE switch recieves the values, so that manual comment is a bit misleading.
Btw: you can still add whitespace between the braces to avoid having your entire switch on a single, unreadable line:
You missed the "string" part of your statement...and btw: to get a little less verbose bgerrors, (and have them displayed when they occur) make a proc called bgerror that takes a single argument and displays the contents on the partyline or whatever...
eg