Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: on non unix platform
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-05-26 (16:56)
From: Damien Doligez <Damien.Doligez@i...>
Subject: Re: on non unix platform
>From: Martin Quinson <>

>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