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

Annotation of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_inc_function.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3601 - (hide annotations) (download) (as text)
Mon Sep 16 16:03:36 2019 UTC (4 years, 7 months ago) by schoenebeck
File MIME type: text/html
File size: 2212 byte(s)
* NKSP: Added recently added built-in functions to reference docs.
* NKSP: Added info about std units and finalness to existing functions.
* NKSP: Added recently added built-in constants ~NI_MATH_E and ~NI_MATH_PI.

1 schoenebeck 2946 <html>
2     <head>
3     <meta name="author" content="Christian Schoenebeck">
4     <title>inc() function</title>
5     <meta name="description" content="Increments the passed integer variable by one.">
6     </head>
7     <body>
8     <h1>inc()</h1>
9     <p>
10     Increments the passed integer variable by one and returns the incremented 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     inc(??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 incremented by one.<br>
30     [required]</td>
31     </tr>
32     </table>
33    
34     <h3>Return Value</h3>
35     <table>
36     <tr>
37 schoenebeck 3578 <th>Data Type</th> <th>Description</th>
38 schoenebeck 2946 </tr>
39     <tr>
40 schoenebeck 3578 <td>Integer Number</td>
41 schoenebeck 2946 <td>Value of the passed variable after the incrementation.</td>
42     </tr>
43     </table>
44 schoenebeck 3601
45     <h3>Remarks</h3>
46     <p>
47     This functions accepts any standard unit and finalness for its argument <code>??variable??</code>.
48     The return value's standard unit and finalness is identical to the passed <code>??variable??</code>'s one.
49     </p>
50    
51 schoenebeck 2946 <note>
52     The return value of this function is an extension by NKSP to allow
53     inline incrementation (like shown in the example below). However if
54     you want to preserve compatibility with KSP then you should not rely
55     on having a return value.
56     </note>
57    
58     <h3>Examples</h3>
59     <p/>
60     <code>
61     on init
62     declare $i
63    
64     message("inc(" & $i & ") = " & inc($i))
65     message("inc(" & $i & ") = " & inc($i))
66     message("inc(" & $i & ") = " & inc($i))
67    
68     message("dec(" & $i & ") = " & dec($i))
69     message("dec(" & $i & ") = " & dec($i))
70     message("dec(" & $i & ") = " & dec($i))
71    
72     end on
73     </code>
74    
75 schoenebeck 3242 <h3>See also</h3>
76     <p><code>dec()</code><p>
77    
78 schoenebeck 3196 <h3>Availability</h3>
79 schoenebeck 2946 <p>Since LinuxSampler 2.0.0.svn15.<p>
80    
81     </body>
82     </html>

  ViewVC Help
Powered by ViewVC