Debian Codegraph @

opcodes/assign.xml

raw symbols SCIP
1
2 <refentry id="assign">
3 <indexterm id="IndexAssign"><primary>=</primary></indexterm>
4 <refentryinfo><title>Instrument Control:Initialization and Reinitialization</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>=</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>=</refname>
13
14 <refpurpose>
15 Performs a simple assignment.
16 </refpurpose>
17 </refnamediv>
18
19 <refsect1>
20 <title>Syntax</title>
21 <synopsis>ares <command>=</command> xarg</synopsis>
22 <synopsis>ires <command>=</command> iarg</synopsis>
23 <synopsis>kres <command>=</command> karg</synopsis>
24 <synopsis>ires, ... <command>=</command> iarg, ...</synopsis>
25 <synopsis>kres, ... <command>=</command> karg, ...</synopsis>
26 <synopsis>table [ kval] <command>=</command> karg</synopsis>
27 </refsect1>
28
29 <refsect1>
30 <title>Description</title>
31 <para>
32 Performs a simple assignment.
33 </para>
34 </refsect1>
35
36 <refsect1>
37 <title>Initialization</title>
38 <para>
39 <emphasis>=</emphasis> (simple assignment) - Put the value of the expression <emphasis>iarg</emphasis> (<emphasis>karg, xarg</emphasis>) into the named result. This provides a means of saving an evaluated result for later use.
40 </para>
41 <para>
42 From version 5.13 onwards the i- and k-rate versions of
43 assignment can take a number of outputs, and an equal or less
44 number of inputs. If there are less the last value is repeated
45 as necessary.
46 </para>
47 <para>
48 From version 5.14 values can be assigned to elements of a vector
49 with the square bracket form.
50 </para>
51 </refsect1>
52
53 <refsect1>
54 <title>Examples</title>
55 <para>
56 Here is an example of the assign opcode. It uses the file <ulink url="examples/assign.csd"><citetitle>assign.csd</citetitle></ulink>.
57
58 <example>
59 <title>Example of the assign opcode.</title>
60
61
62
63 <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>
64 <xi:include href="examples-xml/assign.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
65 </example>
66
67 Its output should include a line like this:
68 <screen>
69 instr 1: i1 = 1234.000</screen>
70 </para>
71 </refsect1>
72
73 <refsect1>
74 <title>See also</title>
75 <para><link linkend="ControlReinitn"><citetitle>Initialization and Reinitialization</citetitle></link></para>
76 <para><link linkend="arrayOpcodes"><citetitle>Array opcodes</citetitle></link></para>
77 </refsect1>
78
79 <refsect1>
80 <title>Credits</title>
81 <para>Example written by &namekevin;.</para>
82 <para>
83 The extension to multiple values is by
84 <simplelist>
85 <member>Author: &namejohn;</member>
86 <member>University of Bath, and Codemist Ltd.</member>
87 <member>Bath, UK</member>
88 <member>February 2010</member>
89 </simplelist>
90 <para>New in version 5.13</para>
91 </para>
92 </refsect1>
93 </refentry>