<doc>
  <legacy_id>1699</legacy_id>
  <name>or</name>
  <type>operator</type>
  <syntax>
    <example><i>value1</i> or <i>value2</i></example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Math, Logic, &amp; Dates</category>
  </classification>
  <references>
    <operator tag="not">not Operator</operator>
    <operator tag="and">and Operator</operator>
    <operator tag="bitOr">bitOr Operator</operator>
    <operator tag="bitXor">bitXor Operator</operator>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Evaluates to true if either <glossary tag="operand">operand</glossary> is true, false if both <glossary tag="operand">operands</glossary> are false.</summary>
  <examples>
    <example>("a" &gt; "b") or ("b" &gt; "a") <code><i>-- evaluates to true</i></code></example>
    <example>(1 &lt; 0) or (1 = 0) <code><i>-- evaluates to false</i></code></example>
    <example>wait until the controlKey is up or the commandKey is up</example>
  </examples>
  <description>
    <p>Use the <b>or</b> <glossary tag="operator">operator</glossary> to combine two or more <glossary tag="logical">logical</glossary> (true or false) <glossary tag="value">values</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>value1</i> and <i>value2</i> are true or false, or <glossary tag="expression">expressions</glossary> that <glossary tag="evaluate">evaluate</glossary> to true or false.</p><p/><p><b>Comments:</b></p><p>If <i>value1</i> is true or <i>value2</i> is true, or if both <i>value1</i> and <i>value2</i> are true, then the <b>or</b> <glossary tag="operation">operation</glossary> <glossary tag="evaluate">evaluates</glossary> to true. Only if both <i>value1</i> and <i>value2</i> are false does the <glossary tag="expression">expression</glossary> <code>value1 or value2</code> <glossary tag="evaluate">evaluate</glossary> to false.</p><p/><p>You can combine the logical operators <b>and</b>, <b>or</b>, and <operator tag="not">not</operator> in an <glossary tag="expression">expression</glossary>.</p><p/><p><code/><b>Note:</b><code/> <glossary tag="LiveCode">LiveCode</glossary> uses what is known as "short-circuit evaluation" for <glossary tag="logical">logical</glossary> <glossary tag="operator">operators</glossary>. This means that <i>value1</i> is <glossary tag="evaluate">evaluated</glossary> first. If <i>value1</i> is true, the <glossary tag="expression">expression</glossary> <code>value1 or value2</code> is true regardless of what <i>value2</i> is (because the <glossary tag="expression">expression</glossary> <glossary tag="evaluate">evaluates</glossary> to true as long as at least one of the <glossary tag="value">values</glossary> is true). In this case, LiveCode does not <glossary tag="evaluate">evaluate</glossary> <i>value2</i>, since doing so is not necessary to determine the value of<code> value1 or value2</code>. For example, evaluating the <glossary tag="expression">expression</glossary> <code>asin(2)</code> normally causes an execution error (because 2 is not a legal <glossary tag="argument">argument</glossary> for the arc sine function), but <glossary tag="evaluate">evaluating</glossary> the <glossary tag="expression">expression</glossary> <code>(1 = 1) or (asin(2) = 1)</code> does not cause an error:  since<code> (1 = 1) </code>is always true, the whole statement is always true and LiveCode never tries to <glossary tag="evaluate">evaluate</glossary> the <function tag="asin">asin</function> <control_st tag="function">function</control_st>.</p>
  </description>
</doc>