Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Boolean
Last updated at 1:09 am UTC on 17 January 2006
Class Boolean provides the common protocol for objects representing truth values in Boolean logic. Its subclasses are True and False. Smalltalk ifTrue:, the only instance of class True, represents the truth value 'true', and likewise false, the unique instance of class False, the truth value 'false' in Boolean logic.

Besides providing messages like and: and or: for doing computations in Boolean arithmetic, the class Boolean with its subclasses provides the basis for conditional execution of code in Smalltalk (via messages ifTrue:, ifFalse:, etc.) as well as for some looping constructs (whileTrue:, whileFalse:, etc.).

See also:
How and/or handle non-Boolean operands