Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Math Object > Math.random() MethodThis function returns a pseudo-random number between 0 and 1. SyntaxReturnsA pseudo-random number between 0 and 1. UsageThis function generates a pseudo-random number between 0 and 1. It takes no parameters. Where possible, it should be used in place of the Clib.rand() method. The Clib.rand() method is to be preferred only when it is necessary to use Clib.srand() to seed the Clib random number generator with a specific value. ExampleThis example generates a random string of characters within a range. The Math.random() function is used to set the range between lowercase a and z. function Test_Click () upper = upper.charCodeAt(0); for (var x = 1; x < 26; x++) TheApplication().RaiseErrorText(str1); See Also |
Siebel eScript Language Reference |