blob: f923f353a9ce32861b1e44aa26d7c26bc022dca7 (
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
|
<refentry id="loop_ge">
<indexterm id="Indexloop_ge"><primary>loop_ge</primary></indexterm>
<refentryinfo><title>Instrument Control:Program Flow Control</title></refentryinfo>
<refmeta>
<refentrytitle>loop_ge</refentrytitle>
</refmeta>
<refnamediv>
<refname>loop_ge</refname>
<refpurpose>
Looping constructions.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
Construction of looping operations.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis><command>loop_ge</command> indx, idecr, imin, label</synopsis>
<synopsis><command>loop_ge</command> kndx, kdecr, kmin, label</synopsis>
</refsect1>
<refsect1>
<title>Initialization</title>
<para>
<emphasis>indx</emphasis> -- i-rate variable to count loop.
</para>
<para>
<emphasis>idecr</emphasis> -- value to decrement the loop.
</para>
<para>
<emphasis>imin</emphasis> -- minimum value of loop index.
</para>
</refsect1>
<refsect1>
<title>Performance</title>
<para>
<emphasis>kndx</emphasis> -- k-rate variable to count loop.
</para>
<para>
<emphasis>kdecr</emphasis> -- value to decrement the loop.
</para>
<para>
<emphasis>kmin</emphasis> -- minimum value of loop index.
</para>
<para>
The actions of <command>loop_ge</command> are equivalent to the
code
<programlisting>
indx <emphasis role="op">=</emphasis> indx <emphasis role="op">-</emphasis> idecr
<emphasis role="opc">if</emphasis> (indx <emphasis role="op">>=</emphasis> imin) <emphasis role="opc">igoto</emphasis> label</programlisting>
<!-- except that the values of the <emphasis>idecr</emphasis> and
<emphasis>imin</emphasis> parameters cannot change in the loop; --> or
<programlisting>
kndx <emphasis role="op">=</emphasis> kndx <emphasis role="op">-</emphasis> kdecr
<emphasis role="opc">if</emphasis> (kndx <emphasis role="op">>=</emphasis> kmin) <emphasis role="opc">kgoto</emphasis> label</programlisting>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<link linkend="loop_gt"><citetitle>loop_gt</citetitle></link>,
<link linkend="loop_le"><citetitle>loop_le</citetitle></link> and
<link linkend="loop_lt"><citetitle>loop_lt</citetitle></link>.
</para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>&nameistvan;. 2006</para>
<para>New in Csound version 5.01</para>
</refsect1>
</refentry>
|