Difference between revisions of "RandomRange"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function RandomRange(aFrom, aTo: Integer): Integer; </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Return...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
<source lang="scar" lines="false"> | <source lang="scar" lines="false"> | ||
− | function RandomRange( | + | function RandomRange(const AFrom, ATo: Integer): Integer; |
</source> | </source> | ||
Line 8: | Line 8: | ||
==Description== | ==Description== | ||
− | Returns a random number from the range [''' | + | Returns a random number from the range ['''AFrom''', '''ATo''' - 1]. |
==Example== | ==Example== |
Latest revision as of 11:28, 23 September 2011
Definition
function RandomRange(const AFrom, ATo: Integer): Integer;
Availability
SCAR Divi 3.00 > Current
Description
Returns a random number from the range [AFrom, ATo - 1].
Example
var i: Integer; begin for i := 1 to 5 do WriteLn(RandomRange(1, 5)); end.