<doc>
  <legacy_id>1055</legacy_id>
  <name>+</name>
  <type>operator</type>
  <syntax>
    <example><i>number1</i> + <i>number2</i></example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Math, Logic, &amp; Dates</category>
  </classification>
  <references>
    <command tag="union">union Command</command>
    <function tag="sum">sum Function</function>
    <operator tag="()">() Operator</operator>
    <operator tag="-">- Operator</operator>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
    <changed version="1.1"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Adds two numbers.</summary>
  <examples>
    <example># Adding two literals</p><p>put 2 + 2 into fourContainer</example>
    <example># Adding a literal to a variable</p><p>set the layer of field myNumber to (myNumber + 2)</example>
    <example># Adding two arrays</p><p>local tArray1, tArray2, tArray3</p><p>put 5 into tArray1["One"]</p><p>put 10 into tArray1["Two"]</p><p>put 6 into tArray2["One"]</p><p>put 11 into tArray2["Two"]</p><p>put tArray1 + tArray2 into tArray3</p><p>put tArray3["One"] &amp; comma &amp; tArray3["Two"]</p><p># -&gt; 11,21</example>
  </examples>
  <description>
    <p>Use the <b>+</b> (plus) <glossary tag="operator">operator</glossary> to add two numbers, or to add two <glossary tag="array">arrays</glossary> containing numbers.</p><p/><p><b>Parameters:</b></p><p>The operands <i>number1</i> and <i>number2</i> are literal numbers, or <glossary tag="expression">expressions</glossary> that <glossary tag="evaluate">evaluate</glossary> to numbers, or <glossary tag="array">arrays</glossary> containing numbers.</p><p/><p><b>Comments:</b></p><p>To add a number to the contents of a container, use the <b>add</b> <glossary tag="command">command</glossary> instead.</p><p/><p>If either <i>number1</i> or <i>number2</i> is an <glossary tag="array">array</glossary>, each of the <glossary tag="array">array</glossary> <glossary tag="element">elements</glossary> must be a number. If a number is added to an <glossary tag="array">array</glossary>, the number is added to each <keyword tag="element">element</keyword>. If an <glossary tag="array">array</glossary> is added to an <glossary tag="array">array</glossary>, both <glossary tag="array">arrays</glossary> must have the same number of <glossary tag="element">elements</glossary> and the same dimension, and each <keyword tag="element">element</keyword> in one <glossary tag="array">array</glossary> is added to the corresponding <keyword tag="element">element</keyword> of the other <glossary tag="array">array</glossary>.</p><p/><p>If an element of one array is empty, the <b>+</b> <glossary tag="operator">operator</glossary> treats its contents as zero.</p><p/><p><b>Changes:</b></p><p>The option to add arrays was introduced in version 1.1. In previous versions, only single numbers could be used with the <b>+</b> <glossary tag="operator">operator</glossary>.</p>
  </description>
</doc>