Debian Codegraph @

opcodes/while.xml

raw symbols SCIP
1
2 <refentry id="while">
3 <indexterm id="IndexWhile"><primary>while</primary></indexterm>
4 <refentryinfo><title>Instrument Control:Program Flow Control</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>while</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>while</refname>
11 <refpurpose>
12 A syntactic looping construction.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 A syntactic looping construction.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis><command>while</command> condition <command>do</command>
26 ... <command>od</command></synopsis>
27 </refsect1>
28
29 <refsect1>
30 <title>Performance</title>
31 <para>
32 The statements between the <emphasis>do</emphasis> and
33 <emphasis>od</emphasis> form the body of a loop which is obeyed
34 while the conditional remains true.
35 </para>
36 </refsect1>
37
38 <refsect1>
39 <title>Examples</title>
40 <para>
41 Here is an example of the while construction. It uses the file <ulink url="examples/while.csd"><citetitle>while.csd</citetitle></ulink>.
42 <example>
43 <title>Example of the while opcode.</title>
44 <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
45 <xi:include href="examples-xml/while.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
46 </example>
47 Its output should include lines like this:
48 <screen>
49 B 0.000 .. 1.000 T 1.000 TT 1.000 M: 0.0
50 new alloc for instr 1:
51 instr 1: p4 = 3.000
52 instr 1: p4 = 2.000
53 instr 1: p4 = 1.000
54 instr 1: p4 = 0.000
55 instr 1: p4 = -1.000
56 B 1.000 .. 2.000 T 2.000 TT 2.000 M: 0.0
57 new alloc for instr 2:
58 instr 2: p4 = 3.000
59 instr 2: p4 = 2.000
60 instr 2: p4 = 1.000
61 instr 2: p4 = 0.000
62 instr 2: p4 = -1.000
63 B 2.000 .. 3.000 T 3.000 TT 3.000 M: 0.0
64 </screen>
65 </para>
66 </refsect1>
67
68 <refsect1>
69 <title>See also</title>
70 <para><link linkend="ControlPgmctl"><citetitle>Program Flow Control: Looping Constructions</citetitle></link></para>
71 </refsect1>
72
73 <refsect1>
74 <title>Credits</title>
75 <para>&namejohn;.</para>
76 <para>New in Csound version 6.04</para>
77 </refsect1>
78 </refentry>