Determine type of a variable in Tcl
问题 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. I have been using the following so far: if {[string is boolean $a]} { #do something } and this seems to work great for the following types: alnum, alpha, ascii, boolean, control, digit, double, false, graph, integer, lower, print, punct, space, true, upper, wordchar, xdigit However it is not capable to tell me if my variable might be an array, a list