| Concept Framework 2.2 documentation | Contents | Index |
| Name | Version | Deprecated |
| rand | version 1.0 | no |
| number () |
|
Returns a pseudorandom number.
Use the srand function to seed the pseudorandom-number generator before calling rand. |
import standard.C.math
import standard.C.time
class Main {
function Main() {
/* Seed the random-number generator with current time so that
* the numbers will be different every time we run.
*/
srand(time());
/* Display 10 numbers. */
for(var i = 0; i < 10; i++)
echo "" + rand() + "\n";
}
}
Results
23308
26874
27985
8661
7135
4724
15947
4854
14226
8279
|
| Documented by Simona Gabriela Plesuvu, generation time: Sun Jan 27 18:15:14 2013 GMT | (c)2013 Devronium Applications |