Debian Codegraph @

opcodes/elseif.xml

raw symbols SCIP
1
2 <refentry id="elseif">
3 <indexterm id="IndexElseif"><primary>elseif</primary></indexterm>
4 <refentryinfo><title>Instrument Control:Program Flow Control</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>elseif</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>elseif</refname>
13 <refpurpose>
14 Defines another &quot;if...then&quot; condition when a &quot;if...then&quot; condition is false.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Defines another &quot;if...then&quot; condition when a &quot;if...then&quot; condition is false.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis><command>elseif</command> xa R xb <command>then</command></synopsis>
28
29 <para>
30 where <emphasis>label</emphasis> is in the same instrument block and is not an expression, and where <emphasis>R</emphasis> is one of the Relational operators (<emphasis>&lt;</emphasis>, <emphasis>=</emphasis>, <emphasis>&lt;=</emphasis>, <emphasis>==</emphasis>, <emphasis>!=</emphasis>) (and <emphasis>=</emphasis> for convenience, see also under <link linkend="ControlConditional"><citetitle>Conditional Values</citetitle></link>).
31 </para>
32 </refsect1>
33
34 <refsect1>
35 <title>Performance</title>
36 <para>
37 <emphasis>elseif</emphasis> is used inside of a block of code between the <link linkend="if"><citetitle>&quot;if...then&quot;</citetitle></link> and <link linkend="endif"><citetitle>endif</citetitle></link> opcodes. When a &quot;if...then&quot; condition is false, it defines another &quot;if...then&quot; condition to be met. Any number of <emphasis>elseif</emphasis> statements are allowed.
38 </para>
39 </refsect1>
40
41 <refsect1>
42 <title>Examples</title>
43 <para>
44 Here is an example of the elseif opcode. It uses the file <ulink url="examples/elseif.csd"><citetitle>elseif.csd</citetitle></ulink>.
45 <example>
46 <title>Example of the elseif opcode.</title>
47 <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>
48 <xi:include href="examples-xml/elseif.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
49 </example>
50 </para>
51 </refsect1>
52
53 <refsect1>
54 <title>See also</title>
55 <para><link linkend="ControlPgmctl"><citetitle>Program Flow Control</citetitle></link></para>
56 <para> More information on this opcode: <ulink url="http://www.csoundjournal.com/2006spring/controlFlow.html"><citetitle>http://www.csoundjournal.com/2006spring/controlFlow.html</citetitle></ulink> , written by Steven Yi </para>
57 </refsect1>
58
59 <refsect1>
60 <title>Credits</title>
61 <para>New in version 4.21</para>
62 </refsect1>
63 </refentry>