<doc>
  <legacy_id>1533</legacy_id>
  <name>merge</name>
  <type>function</type>
  <syntax>
    <example>merge(<i>stringToEvaluate</i>)</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
  </classification>
  <references>
    <control_st tag="return">return Control Structure</control_st>
    <function tag="value">value Function</function>
  </references>
  <history>
    <introduced version="1.1">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary><glossary tag="evaluate">Evaluates</glossary> any <glossary tag="expression">expressions</glossary> in a <keyword tag="string">string</keyword>, replaces them with their value, and <glossary tag="return">returns</glossary> the transformed <keyword tag="string">string</keyword>.</summary>
  <examples>
    <example>merge("1+1 equals [[1+1]]") <code><i>-- returns "1+1 equals 2"</i></code></example>
    <example>merge("The current folder is [[the defaultFolder]]")</example>
  </examples>
  <description>
    <p>Use the <b>merge</b> <control_st tag="function">function</control_st> to combine text with the result of <glossary tag="evaluate">evaluating</glossary> <glossary tag="expression">expressions</glossary> in a single <keyword tag="string">string</keyword>.</p><p/><p><b>Parameters:</b></p><p>The <i>stringToEvaluate</i> is a <keyword tag="string">string</keyword> of any length, which may include <glossary tag="expression">expressions</glossary> enclosed in double square brackets (<code>[[<i>expression</i>]]</code>) and <b>return</b> <glossary tag="statement">statements</glossary> enclosed in "<code>&lt;?</code>" and "<code>?&gt;</code>" (<code>&lt;?return <i>expression</i>?&gt;</code>).</p><p/><p><b>Value:</b></p><p>The <b>merge</b> <control_st tag="function">function</control_st> returns a <keyword tag="string">string</keyword>.</p><p/><p><b>Comments:</b></p><p>The <b>merge</b> <control_st tag="function">function</control_st> <glossary tag="evaluate">Evaluates</glossary> any <glossary tag="expression">expressions</glossary> in double square brackets, and replaces them with the <glossary tag="expression">expression's</glossary> value.</p><p/><p>It also executes any <b>return</b> <glossary tag="statement">statements</glossary> enclosed in "<code>&lt;?</code>" and "<code>?&gt;</code>", and replaces them by the value returned.</p>
  </description>
</doc>