What is wrong with using the seconds port of the the time of day as a seed for random numbers?
Mike

Marc wrote:
Thanks Albert

But I do not think that will work for me.
I use the random number to get a row number.
I have a table with dozens of sample text for form letters
and I want to select them at Random.

I think the Random function will work OK, as long as they
do not restart Rbase several times a day.  It seems as long
as RBase is on it remembers where it left off so to speak
then picks another random number but is you restart RBase
it starts over with the same sequence of numbers.

So, I think this will work, I never really tested it until now.

Thanks
Marc




----- Original Message ----- From: "Albert Berry" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Tuesday, April 08, 2008 12:11 PM
Subject: [RBASE-L] - Re: [SPAM] [RBASE-L] - Random numbers


R:Base uses a pseudo random number generator. You can use the system time variable to the 1/1,000 second to generate pseudo random numbers that are for all intents and purposes random. Here is an example

select (random(INT(1000 * (FLOAT(format(.#time,"hhmmss.sss")))))) from sys_tables where count = 1



Marc wrote:
I just tested this 3 times and get the same numbers each time.
I am setting the Random number to 15 and created 10
The numbers I get are
0 0 5 0 5 3 8 2 10 14 each of the 3 times I tested this.

I hope I am missing something, I sent an update out several months
back that needs truley random numbers.

Marc









Reply via email to