RandomTIAEx

From SCAR Divi Manual
Jump to: navigation, search

Definition

function RandomTIAEx(const Count, Range: Integer; const AllowDuplicates: Boolean): TIntArray;

Availability

SCAR Divi 3.38 > Current

Description

Generates a random TIntArray with a length specified by Count and the range [0,Range-1]. An extended version of this function is available as RandomTIAEx. When AllowDuplicates is set to false, the function will only return unique random values. This means that Range has to be bigger than or equal Count, or the function will throw an exception.

Example

begin
  WriteLn(TIAToStr(RandomTIAEx(10, 10, False)));
end.

See Also