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

    <refpurpose>
      Division operator.
      <indexterm id="IndexSol"><primary>&sol;</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Arithmetic operators perform operations of change-sign (negate), don't-change-sign, logical AND logical OR, add, subtract, multiply and divide. Note that a value or an expression may fall between two of these operators, either of which could take it as its left or right argument, as in
      <literallayout>
a + b * c.
      </literallayout>
    </para>

    <para>
      In such cases three rules apply:
    </para>

    <para>
      1. &ast; and <emphasis>&sol;</emphasis> bind to their neighbors more strongly than &plus; and &minus;. Thus the above expression is taken as
      <literallayout>  
a + (b * c)
      </literallayout>
      with &ast; taking b and c and then &plus; taking a and b &ast; c.
    </para>

    <para>
      2. <emphasis>&plus;</emphasis> and <emphasis>&minus;</emphasis> bind more strongly than &amp;&amp;, which in turn is stronger than &verbar;&verbar;:
      <literallayout>  
a &amp;&amp; b - c &verbar;&verbar; d
      </literallayout>
      is taken as
      <literallayout>  
(a &amp;&amp; (b - c)) &verbar;&verbar; d
      </literallayout>
    </para>

    <para>
      3. When both operators bind equally strongly, the operations are done left to right:
      <literallayout>  
a - b - c i
      </literallayout>
      is taken as
      <literallayout>  
(a - b) - c
      </literallayout>
    </para>

    <para>
      Parentheses may be used as above to force particular groupings.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>a <command>&sol;</command>  b  (no rate restriction)</synopsis>

    <para>
      where the arguments <emphasis>a</emphasis> and <emphasis>b</emphasis> may be further expressions.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the &sol; operator. It uses the files <ulink url="examples/divides.orc"><citetitle>divides.orc</citetitle></ulink> and <ulink url="examples/divides.sco"><citetitle>divides.sco</citetitle></ulink>.

      <example>
        <title>Example of the &sol; operator.</title>

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

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

      Its output should include lines like this:
      <screen>
instr 1:  i1 = 3.000
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="subtracts"><citetitle>-</citetitle></link>, 
      <link linkend="adds"><citetitle>&plus;</citetitle></link>, 
      <link linkend="opand"><citetitle>&amp;&amp;</citetitle></link>, 
      <link linkend="opor"><citetitle>&verbar;&verbar;</citetitle></link>, 
      <link linkend="multiplies"><citetitle>&ast;</citetitle></link>, 
      <link linkend="raises"><citetitle>&circ;</citetitle></link>, 
      <link linkend="modulus"><citetitle>&percnt;</citetitle></link>
    </para>
  </refsect1>

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