<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="int">
  <refmeta>
    <refentrytitle>int</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>int</refname>

    <refpurpose>
      Extracts an integer from a decimal number.
      <indexterm id="IndexInt"><primary>int</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Returns the integer part of <emphasis>x</emphasis>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>int</command>(x)  (init-rate or control-rate args only)</synopsis>

    <para>
      where the argument within the parentheses may be an expression. Value converters perform arithmetic translation from units of one kind to units of another. The result can then be a term in a further expression.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the int opcode. It uses the files <ulink url="examples/int.orc"><citetitle>int.orc</citetitle></ulink> and <ulink url="examples/int.sco"><citetitle>int.sco</citetitle></ulink>.

      <example>
        <title>Example of the int opcode.</title>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/int.orc" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/int.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>

      Its output should include a line like this:
      <screen>
instr 1:  i2 = 3.000
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="abs"><citetitle>abs</citetitle></link>, 
      <link linkend="exp"><citetitle>exp</citetitle></link>, 
      <link linkend="frac"><citetitle>frac</citetitle></link>, 
      <link linkend="log"><citetitle>log</citetitle></link>, 
      <link linkend="log10"><citetitle>log10</citetitle></link>, 
      <link linkend="opi"><citetitle>i</citetitle></link>, 
      <link linkend="sqrt"><citetitle>sqrt</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Example written by &namekevin;.</para>
  </refsect1>
</refentry>
