random number generator

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed Jul 30 13:27:23 PDT 2008


"Michael P." <baseball.mjp at gmail.com> wrote in message 
news:g6qg4m$1kvu$1 at digitalmars.com...

> Thanks for fast reply. :P
> Anyways, I tried importing the std.c.stdlib and the std.c.time to use 
> those exact same functions, but I got errors trying to use time(0) as a 
> argument. Forgot to mention I tried that.
>
> So, what would I put as an argument for rand_seed instead of time(0)? Can 
> I just put in any number? Like 0?
> BTW, don't use Tango.
>
> -Michael P.

You don't have to call rand_seed unless you need a repeatable sequence of 
pseudorandom numbers.  Phobos calls it upon program initialization for you. 




More information about the Digitalmars-d-learn mailing list