<doc>
  <legacy_id>1531</legacy_id>
  <name>trunc</name>
  <type>function</type>
  <syntax>
    <example>the trunc of <i>number</i></example>
    <example>trunc(<i>number</i>)</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Math, Logic, &amp; Dates</category>
  </classification>
  <references>
    <function tag="abs">abs Function</function>
  </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><glossary tag="return">Returns</glossary> the <keyword tag="integer">integer</keyword> part of a number.</summary>
  <examples>
    <example>trunc(33.567) <code><i>-- returns 33</i></code></example>
    <example>trunc(-6.3) <code><i>-- returns -6</i></code></example>
  </examples>
  <description>
    <p>Use the <b>trunc</b> <control_st tag="function">function</control_st> to round a number down.</p><p/><p><b>Parameters:</b></p><p>The <i>number</i> is any number, or <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a number.</p><p/><p><b>Value:</b></p><p>The <b>trunc</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> an <keyword tag="integer">integer</keyword>.</p><p/><p><b>Comments:</b></p><p>The <b>trunc</b> <control_st tag="function">function</control_st> is different from <function tag="round">round</function> in that truncation completely ignores the fractional part of the number. For example, <code>round(4.9)</code> <glossary tag="return">returns</glossary> 5, but <code>trunc(4.9)</code> <glossary tag="return">returns</glossary> 4. This means that the <b>trunc</b> function does not always <constant tag="return">return</constant> the <keyword tag="integer">integer</keyword> closest to the <i>number</i>.</p>
  </description>
</doc>