Difference between revisions of "Random"
From SCAR Divi Manual
(Created page with "==Definition== <func>function Random(const Range: Integer): Integer; </func> ==Availability== SCAR Divi 3.00 > Current ==Description== This function generates a random number f...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Definition== | ==Definition== | ||
− | < | + | <source lang="scar" lines="false"> |
+ | function Random(const Range: Integer): Integer; | ||
+ | </source> | ||
==Availability== | ==Availability== | ||
Line 12: | Line 14: | ||
var | var | ||
i: Integer; | i: Integer; | ||
+ | |||
begin | begin | ||
for i := 1 to 5 do | for i := 1 to 5 do | ||
Line 21: | Line 24: | ||
*[[RandomRange]] | *[[RandomRange]] | ||
*[[Rand]] | *[[Rand]] | ||
+ | *[[RBool]] | ||
+ | *[[RBoolEx]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Math Functions]] | [[Category:Math Functions]] |
Latest revision as of 02:50, 4 September 2011
Definition
function Random(const Range: Integer): Integer;
Availability
SCAR Divi 3.00 > Current
Description
This function generates a random number from 0 to Range - 1 and returns it.
Example
var i: Integer; begin for i := 1 to 5 do WriteLn(Random(5)); end.