- 4.62.2.65 -
Standard Units
System Unit
System Unit Procedures and FunctionsRandom function
Targets: MS-DOS, OS/2, Win32
System Unit
Returns a random number.
Declaration:
function Random [ ( Range: Word) ];
Remarks:
Range, if specified, results in
0 <= Result < Range.
If not specified, the range is
0 <= result < 1.
A call to Randomize
should be made prior to Random.
This initializes the random number generator.
Example:
{$ifndef __CON__}
This program must be compiled as console application only
{ $endif}
begin
Randomize;
repeat
Writeln(Random(65535));
until
KeyPressed;
end.
|
|
|
QSort procedure |
Table of Content |
Randomize procedure |
- 4.62.2.65 -