<doc>
  <legacy_id>1864</legacy_id>
  <name>=</name>
  <type>operator</type>
  <syntax>
    <example><i>value1 = value2</i></example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
    <synonym>is</synonym>
  </synonyms>
  <classification>
    <category>Text and Data Processing</category>
    <category>Math, Logic, &amp; Dates</category>
  </classification>
  <references>
    <operator tag="contains">contains Operator</operator>
    <operator tag="&lt;&gt;">&lt;&gt; Operator</operator>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
    <changed version="6.0"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Compares two <glossary tag="value">values</glossary> and evaluates to true if they are equal, false if they are not equal.</summary>
  <examples>
    <example>1 = 0 <i>-- evaluates to false</i></example>
    <example>17 + 9 = 26 <i>-- evaluates to true</i></example>
    <example>"ABC" = "abc" <i>-- true if and only if caseSensitive is false</i></example>
  </examples>
  <description>
    <p>Use the <b>=</b> (equality) <glossary tag="operator">operator</glossary> to find out whether two <keyword tag="numeric">numeric</keyword> <glossary tag="expression">expressions</glossary> yield the same number or whether two <glossary tag="string">strings</glossary> are equivalent.</p><p/><p><b>Parameters:</b></p><p>The operands <i>value1</i> and <i>value2</i> can be numbers, <glossary tag="literal string">literal strings</glossary> of <keyword tag="characters">characters</keyword> (<glossary tag="delimit">delimited</glossary> with <glossary tag="double quote">double quotes</glossary>), or any sources of <function tag="value">value</function>, including arrays.</p><p/><p><b>Comments:</b></p><p>When comparing strings, the <b>=</b> <glossary tag="operator">operator</glossary> compares the two <glossary tag="value">values</glossary> <keyword tag="character">character</keyword> by <keyword tag="character">character</keyword>. If the <property tag="caseSensitive">caseSensitive</property> <glossary tag="property">property</glossary> is true, the comparison between two <glossary tag="string">strings</glossary> treats uppercase letters as coming before lowercase letters. If the <property tag="caseSensitive">caseSensitive</property> <glossary tag="property">property</glossary> is false, the comparison is not <href tag="../glossary/casedashsensitive.xml">case-sensitive</href>, so "a" = "A".</p><p/><p>When comparing arrays, the <b>=</b> operator first checks if the number of elements in each array is the same, if not the two arrays are different. If the arrays have the same number of elements, they are equal if each element is equal. Specifically this means:</p><p/><p>array1 = array2 if (and only if):</p><p>  - the number of elements of array1 = the number of elements of array2 and</p><p>  - for each element e in array1, array1[e] = array2[e].</p><p/><p><b>Note:</b> If an array is compared with a string, the array will first be converted into the empty string, thus any array is always equal to the empty string, and not equal to any other string.</p><p/><p><b>Note:</b> As of version 6.0 onwards expressions such as 'tArray is empty' will return true is and only if tArray contains the empty string. For example</p><p/><p>put empty into tArray</p><p>answer tArray is empty -- true</p><p/><p>put 100 into tArray["foo"]</p><p>answer tArray is empty -- false (prior to 6.0 this would be true)</p><p/><p><b>Changes:</b></p><p>The ability to compare two arrays using <b>=</b> was added in version 3.5. Previously, comparing two arrays would have converted both arrays into the empty string, and always returned true.</p><p/><p>The ability to check if an array is empty was added in version 6.0. Previously checking if an array was empty would always return true.</p>
  </description>
</doc>