/[svn]/doc/docbase/instrument_scripts/nksp/reference/functions/nksp_dec_function.html
ViewVC logotype

Contents of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_dec_function.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3242 - (show annotations) (download) (as text)
Sun May 28 17:11:20 2017 UTC (3 years, 6 months ago) by schoenebeck
File MIME type: text/html
File size: 1955 byte(s)
- NKSP: Added "See also" section to inc() and dec() functions.

1 <html>
2 <head>
3 <meta name="author" content="Christian Schoenebeck">
4 <title>dec() function</title>
5 <meta name="description" content="Decrements the passed integer variable by one.">
6 </head>
7 <body>
8 <h1>dec()</h1>
9 <p>
10 Decrements the passed integer variable by one and returns the decremented value.
11 Accordingly you may only pass script variables of type integer which are allowed
12 to modified (i.e. they may not be declared as <code lang="nksp">const</code>).
13 </p>
14
15 <h3>Function Prototype</h3>
16 <p/>
17 <code lang="nksp">
18 dec(??variable??)
19 </code>
20
21 <h3>Arguments</h3>
22 <table>
23 <tr>
24 <th>Argument Name</th> <th>Data Type</th> <th>Description</th>
25 </tr>
26 <tr>
27 <td><code>??variable??</code></td>
28 <td>Integer Variable</td>
29 <td>The integer variable to be decremented by one.<br>
30 [required]</td>
31 </tr>
32 </table>
33
34 <h3>Return Value</h3>
35 <table>
36 <tr>
37 <th>Description</th> <th>Data Type</th>
38 </tr>
39 <tr>
40 <td>Value of the passed variable after the decrementation.</td>
41 <td>Integer Number</td>
42 </tr>
43 </table>
44
45 <note>
46 The return value of this function is an extension by NKSP to allow
47 inline decrementation (like shown in the example below). However if
48 you want to preserve compatibility with KSP then you should not rely
49 on having a return value.
50 </note>
51
52 <h3>Examples</h3>
53 <p/>
54 <code>
55 on init
56 declare $i
57
58 message("inc(" & $i & ") = " & inc($i))
59 message("inc(" & $i & ") = " & inc($i))
60 message("inc(" & $i & ") = " & inc($i))
61
62 message("dec(" & $i & ") = " & dec($i))
63 message("dec(" & $i & ") = " & dec($i))
64 message("dec(" & $i & ") = " & dec($i))
65
66 end on
67 </code>
68
69 <h3>See also</h3>
70 <p><code>inc()</code><p>
71
72 <h3>Availability</h3>
73 <p>Since LinuxSampler 2.0.0.svn15.<p>
74
75 </body>
76 </html>

  ViewVC Help
Powered by ViewVC