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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2732 - (show annotations) (download) (as text)
Sun Apr 26 20:54:00 2015 UTC (8 years, 11 months ago) by schoenebeck
File MIME type: text/html
File size: 1357 byte(s)
* Initial import of doc.linuxsampler.org.

1 <html>
2 <head>
3 <meta name="author" content="Christian Schoenebeck">
4 <title>num_elements() function</title>
5 <meta name="description" content="Returns the size of the requested array variable.">
6 </head>
7 <body>
8 <h1>num_elements()</h1>
9 <p>
10 Returns the size of the requested array variable, that is the amount of
11 total values that array variable contains.
12 </p>
13
14 <h3>Function Prototype</h3>
15 <p/>
16 <code>
17 num_elements(??array-variable??)
18 </code>
19
20 <h3>Arguments</h3>
21 <table>
22 <tr>
23 <th>Argument Name</th> <th>Data Type</th> <th>Description</th>
24 </tr>
25 <tr>
26 <td><code>??array-variable??</code></td>
27 <td>Integer Array</td>
28 <td>Array variable for which the size shall be obtained from.<br>
29 [required]</td>
30 </tr>
31 </table>
32
33 <h3>Return Value</h3>
34 <table>
35 <tr>
36 <th>Description</th> <th>Data Type</th>
37 </tr>
38 <tr>
39 <td>Size of the passed array variable.</td>
40 <td>Integer Number</td>
41 </tr>
42 </table>
43
44 <h3>Examples</h3>
45 <p/>
46 <code>
47 on init
48 declare const $SIZE := 5
49 declare %a[$SIZE] := ( 0,1,2,3,4 )
50
51 $i := 0
52 while ($i < num_elements(%a))
53 message("array[" & $i & "] = " & %a[$i])
54 $i := $i + 1
55 end while
56 end on
57 </code>
58
59 </body>
60 </html>

  ViewVC Help
Powered by ViewVC