[erlang-questions] HOWTO GENERATE RANDOM NUMBER?

Pierpaolo Bernardi olopierpa@REDACTED
Thu Dec 6 07:33:27 CET 2007


On Dec 6, 2007 7:02 AM, Dino M. B. <mypascal2000@REDACTED> wrote:

> How do I create a function in erlang  that will generate a rundom integer number btw say 1 and 10 and return it ?

No need to create it, it's already provided by the random module:

3> random:uniform(10).
8


P.



More information about the erlang-questions mailing list