<ppdoc>
<copyright>
Copyright (c) 2001 by Addison Wesley Longman, Inc. This material may
be distributed only subject to the terms and conditions set forth in
the Open Publication License, v1.0 or later (the latest version is
presently available at http://www.opencontent.org/openpub/).
<p/>
Distribution of substantively modified versions of this document is
prohibited without the explicit permission of the copyright holder.
<p/>
Distribution of the work or derivative of the work in any standard
(paper) book form is prohibited unless prior permission is obtained
from the copyright holder.
</copyright>
<class name="TrueClass" super="Object" type="class" ref="xref-000001">
  The global value <const>true</const> is the only instance of class
  <classname>TrueClass</classname> and represents a logically true value in boolean
  expressions. The class provides operators allowing <const>true</const>
  to be used in logical expressions.
<p/>
  <methods type="instance">
        <method name="&amp;" ref="_et">
      <callseq>
        <const>true</const> &amp; <obj>anObject</obj>
        <returns><obj>anObject</obj></returns>
      </callseq>
      <desc>
<p/>
      And---Returns <const>false</const> if <obj>anObject</obj> is <tt>nil</tt> or
      <const>false</const>, <const>true</const> otherwise.
<p/>
      </desc>
    </method>
<p/>
        <method name="^" ref="_up">
      <callseq>
        <const>true</const> ^ <obj>anObject</obj>
        <returns>!<obj>anObject</obj></returns>
      </callseq>
      <desc>
<p/>
      Exclusive Or---Returns <const>true</const> if
      <obj>anObject</obj> is <tt>nil</tt> or <const>false</const>,
      <const>false</const> otherwise.
<p/>
      </desc>
    </method>
<p/>
        <method name="|" ref="_ba">
      <callseq>
        <const>true</const> | <obj>anObject</obj>
        <returns><const>true</const></returns>
      </callseq>
      <desc>
<p/>
      Or---Returns <const>true</const>. As <obj>anObject</obj> is an
      argument to a method call, it is always evaluated; there is no
      short-circuit evaluation in this case.
<p/>
<codefragment>
<alltt><fullcode><![CDATA[        true |  puts("or")
        true || puts("logical or")
]]></fullcode>
true<nbsp/>|<nbsp/><nbsp/>puts("or")
true<nbsp/>||<nbsp/>puts("logical<nbsp/>or")
</alltt>
</codefragment>
<em>produces:</em>
<codefragment><alltt>
or
</alltt>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
  </methods>
<p/>
</class>
</ppdoc>
