Back

Randomize and Random:
[Unit System]

procedure TForm1.Button1Click(Sender: TObject);
var I: Integer;
begin
  Randomize;
  for I := 1 to 50 do
    begin
        Label1.Caption := IntToStr(Random(I));
    end;
end;
Everytime you click on the button you get a random number from 1 to 50.


Back