Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Random.int on non unix platform
@ 1999-06-27 15:53 Martin Quinson
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Quinson @ 1999-06-27 15:53 UTC (permalink / raw)
  To: caml-list

How can I write this without the unix library ?
 
Random.init (int_of_float (Unix.time ()));;

Thanks, Mt.




^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re:  Random.int on non unix platform
@ 1999-05-26 12:07 Damien Doligez
  1999-06-28 22:35 ` Martin Quinson
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Doligez @ 1999-05-26 12:07 UTC (permalink / raw)
  To: caml-list

>From: Martin Quinson <mquinson@zeppelin-cb.de>

>How can I write this without the unix library ?
>
>Random.init (int_of_float (Unix.time ()));;

You can do:

    Random.init (int_of_float (Sys.time ()));;

or you can input a random seed from the user and give it as argument
to Random.init.

-- Damien




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-05-28 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-27 15:53 Random.int on non unix platform Martin Quinson
  -- strict thread matches above, loose matches on Subject: below --
1999-05-26 12:07 Damien Doligez
1999-06-28 22:35 ` Martin Quinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox