If it is required that the sequence produced by successive calls of random/1 be reproducible, seed(Seed) can be called to initialise the calls with the integer Seed. Do not assume that the same sequence will be produced for the same seed on different platforms, because the C library's implementation of random() may differ.
Success:
[eclipse]: random(N1), random(N2).
N1 = 464880439
N2 = 285401533
yes.
[eclipse]: seed(1), random(N).
N = 2078917053
yes.
[eclipse]: seed(1), random(N).
N = 2078917053
yes.
Fail:
random(12345).
Error:
random(12.34). (Error 5).