RandomTIAEx

From SCAR Divi Manual
Revision as of 13:46, 21 November 2012 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function RandomTIAEx(const Count, Range: Integer; const AllowDuplicates: Boolean): TIntArray; </source> ==Availability== SCA...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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