Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Random Function
The Random function returns a pseudorandom number.
Without arguments, it returns a floating-point number in the range
≤ Result < 1. The second form takes an
integer argument and returns an integer in the range
≤ Result < Limit.
Random is not a real function.
Delphi uses a pseudorandom number generator (PRNG) with a cycle of 232. Although adequate for simple simulations, it is not suitable for use in encryption or other areas where you need a high-quality PRNG.
Call Randomize once to start the sequence of
pseudorandom numbers at a different number each time you run the
program.