Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:55 am
by Jade Support >> Mon, 12 Jul 2004 2:21:32 GMT
Correct, app.random(50) will generate a random number in the range 0-50 inclusive. As a note there is a new method available in JADE 6.0, app::random31().
random31(seed : Integer io; range: Integer): Integer;
The Application class random31 method returns a random positive number in the range 0 through the value of the range parameter, inclusive. Use this method to generate random numbers with a larger range of values compared to the Application class random method.
In addition, the random31 method enables you to generate multiple sets of random numbers within a single application, by maintaining multiple values of the seed parameter.
Aaron.