On Wednesday, January 15, 2003, at 08:28 AM, Maurice O'Prey wrote:
How do I extract a whole number from the rand function.
int() is your friend, if you want an integer from rand.
I am using rand 25000; which generates a random number with many decimal&myRand = int(rand(25000) + 1);
places, e.g. 16235.2587965, I need a whole number as the answer.
Rand gives a number between 0 and the number you want, so if you want to include the end number in the range, you either need to add one to the result or change the argument to rand, depending on whether zero is in your intended range.
Sorry if this is simple...
Not at all, this is the only kind I have a chance at getting :-) take care, Chris -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]