Version 3 of Boolean

Updated 2006-08-04 14:53:59

True or False. Tcl has no separate Boolean type, like in C, the integers 0 (false) and 1 (true - in fact any nonzero integer) are used.

NEM: Although expr will also accept "true" and "false" (and "yes"/"no"..) as Boolean values.

1S In fact, there's no separate Integer type in Tcl as well -- everything is a string. A proper boolean value is either a proper integer, with, like in C, zero meaning false and non-zero meaning true, or one of the following: yes, no, true, false, on, or off.

See Boolean Logic or Integers as Boolean Functions.


[ Category Glossary ]