For Newbie

Friday, 25 November 2011

Generate random Value in Delphi (integer values)

Here a sample to get a randomized integer value in delphi 7

random integer value delphi







here the source code

procedure TForm1.Button1Click(Sender: TObject);
var i,int : integer;
begin

   for i := 1 to 5 do
   begin
   int := 1 + Random(100)  ;
   label1.Caption:=inttostr(int);
   end;
end;

Share on Facebook
Share on Twitter
Share on Google+

Related : Generate random Value in Delphi (integer values)