<doc>
  <legacy_id>1241</legacy_id>
  <name>max</name>
  <type>function</type>
  <syntax>
    <example>max(<i>numbersList</i>)</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Math, Logic, &amp; Dates</category>
  </classification>
  <references>
    <function tag="sum">sum Function</function>
    <function tag="average">average Function</function>
    <function tag="extents">extents Function</function>
    <operator tag="&gt;">&gt; Operator</operator>
    <operator tag="&lt;=">&lt;= Operator</operator>
    <operator tag="&gt;=">&gt;= 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><glossary tag="return">Returns</glossary> the largest number from a list of numbers.</summary>
  <examples>
    <example>max(17,34,8,1) <code><i>-- returns 34</i></code></example>
    <example>put max(returnedValues) into upperLimit</example>
  </examples>
  <description>
    <p>Use the <b>max</b> <control_st tag="function">function</control_st> to find the highest value in a set of <glossary tag="value">values</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>numbersList</i> is a comma-separated list of numbers, or an <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to such a list, or an <glossary tag="array">array</glossary> containing only numbers.</p><p/><p><b>Value:</b></p><p>The <b>max</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a number.</p><p/><p><b>Comments:</b></p><p>You can use the <b>max</b> and <function tag="min">min</function> <glossary tag="function">functions</glossary> together to limit a value to a certain <glossary tag="range">range</glossary>. For example, the expression</p><p><code/>  max(10,min<i>(myValu</i>e,100))</p><p>yields a number between 10 and 100. If<i> myValu</i>e is within the limits, the expression is equal to<i> myValu</i>e; if it is greater than 100, the expression evaluates to 100; and if it is less than 10, the expression evaluates to 10.</p><p/><p>If the <i>numbersList</i> is empty, the <b>max</b> <control_st tag="function">function</control_st> returns zero.</p><p/><p><b>Changes:</b></p><p>The ability to use an array was introduced in version 1.1. In previous versions, only lists of numbers could be used with the <b>max</b> <control_st tag="function">function</control_st>.</p>
  </description>
</doc>