Determine type of a variable in Tcl

前端 未结 6 2166
不思量自难忘°
不思量自难忘° 2020-12-08 23:34

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 th

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-08 23:53

    For the specific case of telling if a value is usable as a dictionary, tcllib's dicttool package has a dict is_dict command that returns a true value if can act as one.

提交回复
热议问题