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

    <refpurpose>
      Returns an absolute value.
      <indexterm id="IndexAbs"><primary>abs</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Returns the absolute value of <emphasis>x</emphasis>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>abs</command>(x) (no rate restriction)</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 abs opcode. It uses the files <ulink url="examples/abs.orc"><citetitle>abs.orc</citetitle></ulink> and <ulink url="examples/abs.sco"><citetitle>abs.sco</citetitle></ulink>.

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

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

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

      Its output should include lines like:
      <screen>
instr 1:  i2 = 6.000
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="exp"><citetitle>exp</citetitle></link>,
      <link linkend="frac"><citetitle>frac</citetitle></link>,
      <link linkend="int"><citetitle>int</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>
