unit Unit1;

interface

uses forms, Controls, StdCtrls, Buttons, Classes ;

type
a = record
x: extended;
y: extended;
end;

TForm1 = class(TForm)
Label1: TLabel;
BitBtn2: TBitBtn;
Label2: TLabel;

procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation
{$R *.DFM}

procedure TForm1.BitBtn2Click(Sender: TObject);
Var i,j: integer;
aa: a;
Begin

for i:= 1 to 100000
do
for j:=1 to 100000 do
begin
aa.x:=i;
aa.y:=j;
end;
form1.label2.caption:='Calculation finished';
end;
end.

 

-----------------------------------------------

program Test2;

uses
Forms,
Unit1 in 'Unit1.pas' {Form1};

{$R *.RES}

begin

Application.Title := 'Testing speed of loops';
Application.Initialize;
{ B:=0; }
Application.CreateForm(TForm1, Form1);

Application.Run;


end.