Seed(5);
Rand();
732175462471183822614941902
-------------------------------
Rand();
56676524785038889475475113449
-------------------------------
Seed(5); -- with the same seed, 'Rand' generates the same sequence
Rand();
732175462471183822614941902
-------------------------------
Rand();
56676524785038889475475113449
-------------------------------
-- The following shows how to make a seed based on the date.
D := Date();
D;
Mon Mar 02 14:43:44 1998
-------------------------------
F := Sum([Ascii(D[N])| N In 1..Len(D)]);
F;
[1455]
-------------------------------
Seed(F[1]);
|