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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3578 - (show annotations) (download) (as text)
Thu Aug 29 12:13:17 2019 UTC (4 years, 6 months ago) by schoenebeck
File MIME type: text/html
File size: 1573 byte(s)
* NKSP reference: Minor cosmetical corrections.

1 <html>
2 <head>
3 <meta name="author" content="Christian Schoenebeck">
4 <title>random() function</title>
5 <meta name="description" content="Random number generator function.">
6 </head>
7 <body>
8 <h1>random()</h1>
9 <p>
10 Provides a pseudo random number generator. Each time this function
11 is called, another random number will be returned.
12 </p>
13
14 <h3>Function Prototype</h3>
15 <p/>
16 <code lang="nksp">
17 random(??minimum??, ??maximum??)
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>??minimum??</code></td>
27 <td>Integer Number</td>
28 <td>The smallest number of allowed value range (including this value).<br>
29 [required]</td>
30 </tr>
31 <tr>
32 <td><code>??maximum??</code></td>
33 <td>Integer Number</td>
34 <td>The highest number of allowed value range (including this value).<br>
35 [required]</td>
36 </tr>
37 </table>
38
39 <h3>Return Value</h3>
40 <table>
41 <tr>
42 <th>Data Type</th>
43 <th>Description</th>
44 </tr>
45 <tr>
46 <td>Integer Number</td>
47 <td>Next random number within the requested value range.</td>
48 </tr>
49 </table>
50
51 <h3>Examples</h3>
52 <p/>
53 <code>
54 on init
55 message("random(-5,5) = " & random(-5,5))
56 message("random(-5,5) = " & random(-5,5))
57 message("random(-5,5) = " & random(-5,5))
58 message("random(-5,5) = " & random(-5,5))
59 end on
60 </code>
61
62 </body>
63 </html>

  ViewVC Help
Powered by ViewVC