title: Determine type of a variable in Tcl
body: <p>I'm looking for a way to find the type of a variable in Tcl. For example if I have the variable $a and I want to know whether it is an integer.</p>
  
  <p>I have been using the following so far:</p>
  
  <pre><code>    if {[string is boolean $a]} {
      #do something
      }
  </code></pre>
  
  <p>and this seems to work great for the following types:<br>
  alnum, alpha, ascii, boolean, control, digit, double, false, graph, integer, lower, print, punct, space, true, upper, wordchar, xdigit</p>
  
  <p>However it is not capable to tell me if my variable might be an array, a list or a dictionary. Does anyone know of a way to tell if a variable is either of those three?</p>