[LES]: The [Endekalogue] already provides some rules for the names of variables, but I thought this topic could be useful to clarify a few more details, especially to newcomers because Tcl allows a lot of liberty with the names of variables that other languages never have allowed and probably never will. Since I am Brazilian and my language has more than the usual and meager 26 characters, I will begin with a few observations I have made in relation to special characters: * Tcl allows spaces in variable names. You just need to wrap the name with the brackets: % set {some variable name} 2 % set {some variable name} 2 % puts ${some variable name} 2 * Tcl also allows special characters, so long as these are also wrapped in brackets: % set !@weird¬* "yikes!" % set !@weird¬* yikes! % puts ${!@weird¬*} yikes! % set acentuação "sim!" % set acentuação sim! % puts ${acentuação} sim! Unfortunately, the cedilla and/or accented vowels are not considered "normal" characters. I could really swear it was not like that until not too long ago. But I am probably mistaken. Anyway, it's still better than most languages. * Even though the brackets are required whenever you refer to the '''content''' of the variable (when you use the '''$''' sign), they are not required when you refer to the variable's name, which gives us a lot of liberty: set !#@{blah}%¨& oi {1 2 3 4} foreach i [ set !#@{blah}%¨& ] {puts $i} 1 2 3 4 It also allows many interesting visual tricks: set foo "one little, two little, three little indians" regexp -all {(one).*(two).*(three).*} $foo => !g1 !g2 !g3 The last example creates four variables: * '''=>''' : one little, two little, three little indians * '''!g1''' : one * '''!g2''' : two * '''!g3''' : three (LES will come back later with a more important aspect he wanted to bring up and forgot) :-(