Hi all

R:base is using that same seed and will therefore result in the same random
values.
the only way you can get somewhat more of a random is to use time.
like divide the current seconds by the current minute and you that as a seed
then multiply you base number times the seed and round to whole number

example: random = round(1000 * (sec / min))

Ben Johansen

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of rich
Sent: Monday, April 23, 2001 8:38 AM
To: [EMAIL PROTECTED]
Subject: Re: Randomly generated unique numbers - Razzak's Reply


One item to watch out for:
1. If you set a variable to a random number like: set var vrand =
(random(1000)) it will generate a number.
2. if you exit rbase and restart it, define the variable again you will get
the same random number.

rich
----- Original Message -----
From: "A. Razzak Memon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 10:35 AM
Subject: Re: Randomly generated unique numbers - Razzak's Reply


>
> Bob,
>
> Use the R:BASE (RANDOM(value)) Function!
>
> http://www.RSyntax.com
>
> Enjoy!
>
> Very Best Regards,
>
> Razzak.
>
> At 10:05 AM 4/23/2001 -0400, Bob Powell wrote:
> >
> >Does anyone know how to randomly generate a nine
> >digit number that is always unique?
>
>
> ===================================-============================
> R:BASE Developers's Conference: http://www.rbase.com/conference
> Official R:BASE List Server:    mailto:[EMAIL PROTECTED]
> RBTI Events/Training:      http://www.rbase2000.com/events
> R:DCC Members:      http://www.rbase2000.com/rdcc
> ================================================================
> R:BASE, Oterro & R:Tango are registered trademarks of RBTI.
> ==================================-=============================



Reply via email to