summaryrefslogtreecommitdiff
path: root/opcodes/loop_le.xml
blob: 3e5296150d9e6f865f08e5e8cc52115b9549b32e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<refentry id="loop_le">
<indexterm id="Indexloop_le"><primary>loop_le</primary></indexterm>
  <refentryinfo><title>Instrument Control:Program Flow Control</title></refentryinfo>
  <refmeta>
    <refentrytitle>loop_le</refentrytitle>
  </refmeta>
  

  <refnamediv>
    <refname>loop_le</refname>
    <refpurpose>
      Looping constructions.
    </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Description</title>
    <para>
      Construction of looping operations.
   </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis><command>loop_le </command>  indx, incr, imax, label</synopsis>
    <synopsis><command>loop_le </command>  kndx, kncr, kmax, label</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>indx</emphasis> -- i-rate variable to count loop.
    </para>

    <para>
      <emphasis>incr</emphasis> -- value to increment the loop.
    </para>

    <para>
      <emphasis>imax</emphasis> -- maximum value of loop index.
    </para>

  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kndx</emphasis> -- k-rate variable to count loop.
    </para>
    <para>
      <emphasis>kncr</emphasis> -- value to increment the loop.
    </para>
    <para>
      <emphasis>kmax</emphasis> -- maximum value of loop index.
    </para>
    <para>
      The actions of <command>loop_le</command> are equivalent to the
      code
       <programlisting>
         indx  =  indx + incr
         if (indx &lt;= imax) igoto label
       </programlisting>
 <!-- except that the values of the <emphasis>incr</emphasis> and
      <emphasis>imax</emphasis> paramemter cannot change in the loop; --> or
       <programlisting>
         kndx  =  kndx + kncr
         if (kndx &lt;= kmax) kgoto label
       </programlisting>
    </para>
  </refsect1>
  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="loop_ge"><citetitle>loop_ge</citetitle></link>,
      <link linkend="loop_gt"><citetitle>loop_gt</citetitle></link> and
      <link linkend="loop_lt"><citetitle>loop_lt</citetitle></link>.
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>&nameistvan;.</para>
    <para>New in Csound version 5.01</para>
  </refsect1>
</refentry>