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

  <refnamediv>
    <refname>random</refname>
    <refpurpose>
      Generates is a controlled pseudo-random number series between min and max values.
      <indexterm id="IndexRandom"><primary>random</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      Generates is a controlled pseudo-random number series between min and max values.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>random</command> kmin, kmax</synopsis>

    <synopsis>ir <command>random</command> imin, imax</synopsis>

    <synopsis>kr <command>random</command> kmin, kmax</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>imin</emphasis> -- minimum range limit
    </para>

    <para>
      <emphasis>imax</emphasis> -- maximum range limit
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kmin</emphasis> -- minimum range limit
    </para>

    <para>
      <emphasis>kmax</emphasis> -- maximum range limit
    </para>

    <para>
      The <emphasis>random</emphasis> opcode is similar to <link linkend="linrand"><citetitle>linrand</citetitle></link> and <link linkend="trirand"><citetitle>trirand</citetitle></link> but sometimes I [&namegabriel;] find it more convenient because allows the user to set arbitrary minimum and maximum values.
    </para>
  </refsect1>

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

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

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

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

      Its output should include lines like:
      <screen>
k1 = 414.232056
k1 = 419.393402
k1 = 275.376373
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="linrand"><citetitle>linrand</citetitle></link>,
      <link linkend="randomh"><citetitle>randomh</citetitle></link>,
      <link linkend="randomi"><citetitle>randomi</citetitle></link>,
      <link linkend="trirand"><citetitle>trirand</citetitle></link>
    </para>
  </refsect1>

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