oder man nutzt gleich dieses hier:
Zitat von
DelphiHilfe:
RandomRange:
Returns a random integer from a specified range.
Unit
Math
Category
random number routines
function RandomRange(const AFrom, ATo: Integer): Integer;
Description
RandomRange returns a random integer from the range that extends between AFrom and ATo (inclusive). RandomRange can handle negative ranges (where AFrom is greater than ATo).
To initialize the random number generator, add a single call Randomize or assign a value to the RandSeed variable before making any calls to RandomRange.
Grüße
Klaus