Squeak Class Documentation category index | class index  
 
True
  category: Kernel-Objects
  superclass: Boolean
  subclasses:

True defines the behavior of its single instance, true -- logical assertion. Notice how the truth-value checks become direct message sends, without the need for explicit testing.

Be aware however that most of these methods are not sent as real messages in normal use. Most are inline coded by the compiler as test and jump bytecodes - avoiding the overhead of the full message sends. So simply redefining these methods here will have no effect.

instance methods
  controlling
  and:
ifFalse:
ifFalse:ifTrue:
ifTrue:
ifTrue:ifFalse:
or:

  logical operations
  &
not
|

  printing
  printOn:

class methods
  as yet unclassified
  initializedInstance

instance methods
  controlling top  
 

and:

Nonevaluating conjunction -- answer the value of alternativeBlock since
the receiver is true.


 

ifFalse:

Since the condition is true, the value is the true alternative, which is nil.
Execution does not actually reach here because the expression is compiled
in-line.


 

ifFalse:ifTrue:

Answer the value of trueAlternativeBlock. Execution does not
actually reach here because the expression is compiled in-line.


 

ifTrue:

Answer the value of alternativeBlock. Execution does not actually
reach here because the expression is compiled in-line.


 

ifTrue:ifFalse:

Answer with the value of trueAlternativeBlock. Execution does not
actually reach here because the expression is compiled in-line.


 

or:

Nonevaluating disjunction -- answer true since the receiver is true.


  logical operations top  
 

&

Evaluating conjunction -- answer alternativeObject since receiver is true.


 

not

Negation--answer false since the receiver is true.


 

|

Evaluating disjunction (OR) -- answer true since the receiver is true.


  printing top  
 

printOn:

Append to the argument, aStream, a sequence of characters that
identifies the receiver.


class methods
  as yet unclassified top  
 

initializedInstance

Answer an instance of the receiver which in some sense is initialized. In the case of Morphs, this will yield an instance that can be attached to the Hand after having received the same kind of basic initialization that would be obtained from an instance chosen from the 'new morph' menu. Return nil if the receiver is reluctant for some reason to return such a thing