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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2759 - (hide annotations) (download) (as text)
Wed Apr 29 20:58:12 2015 UTC (8 years, 11 months ago) by schoenebeck
File MIME type: text/html
File size: 1565 byte(s)
- NKSP random() function: Fixed a copy paste error.

1 schoenebeck 2732 <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 schoenebeck 2742 <code lang="nksp">
17 schoenebeck 2732 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 schoenebeck 2759 <td><code>??maximum??</code></td>
33 schoenebeck 2732 <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>Description</th> <th>Data Type</th>
43     </tr>
44     <tr>
45     <td>Next random number within the requested value range.</td>
46     <td>Integer Number</td>
47     </tr>
48     </table>
49    
50     <h3>Examples</h3>
51     <p/>
52     <code>
53     on init
54     message("random(-5,5) = " & random(-5,5))
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     end on
59     </code>
60    
61     </body>
62     </html>

  ViewVC Help
Powered by ViewVC