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

Annotation of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_search_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: 2076 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 3223 <html>
2     <head>
3     <meta name="author" content="Christian Schoenebeck">
4     <title>search() function</title>
5     <meta name="description" content="Search for a certain value within an array.">
6     </head>
7     <body>
8     <h1>search()</h1>
9     <p>
10 schoenebeck 3224 Searches for the sought value <code>??needle??</code> in the given
11 schoenebeck 3223 <code>??array??</code>, if such a value is found, then this function
12     returns the first index of the value being found. Otherwise if the
13     array does not have such a value, it returns <code>-1</code> instead.
14     </p>
15    
16     <h3>Function Prototype</h3>
17     <p/>
18     <code lang="nksp">
19     search(??array??, ??needle??)
20     </code>
21    
22     <h3>Arguments</h3>
23     <table>
24     <tr>
25     <th>Argument Name</th> <th>Data Type</th> <th>Description</th>
26     </tr>
27     <tr>
28     <td><code>??array??</code></td>
29 schoenebeck 3601 <td>Integer&nbsp;Array&nbsp;Variable&nbsp;or<br>
30     Real&nbsp;Array&nbsp;Variable</td>
31     <td>The array variable to be scanned.<br>
32 schoenebeck 3223 [required]</td>
33     </tr>
34     <tr>
35     <td><code>??needle??</code></td>
36 schoenebeck 3601 <td>Integer&nbsp;Number&nbsp;or<br>
37     Real&nbsp;Number</td>
38 schoenebeck 3223 <td>The value to be searched for.<br>
39     [required]</td>
40     </tr>
41     </table>
42    
43     <h3>Return Value</h3>
44     <table>
45     <tr>
46 schoenebeck 3578 <th>Data Type</th>
47     <th>Description</th>
48 schoenebeck 3223 </tr>
49     <tr>
50 schoenebeck 3578 <td>Integer Number</td>
51 schoenebeck 3223 <td>Index of the first element found with that value, otherwise <code>-1</code> if nothing found.</td>
52     </tr>
53     </table>
54    
55 schoenebeck 3601 <h3>Remarks</h3>
56     <p>
57     If <code>??array??</code> is an Integer Array Variable then <code>??needle??</code>
58     <b>must</b> be an Integer Number, or if
59     <code>??array??</code> is a Real Array Variable then <code>??needle??</code>
60     <b>must</b> be a Real Number instead.
61     </p>
62    
63 schoenebeck 3223 <h3>Examples</h3>
64     <p>None yet.</p>
65    
66     <h3>See also</h3>
67     <p><code>sort()</code>, <code>array_equal()</code><p>
68    
69     <h3>Availability</h3>
70     <p>Since LinuxSampler 2.0.0.svn52.<p>
71    
72     </body>
73     </html>

  ViewVC Help
Powered by ViewVC