Hello to guys/girls on the forum. Question I have is following. How to speed this loop?
begin
var
i:integer;
begin
for i:=1 to 9999999 do
begin
//do something
Memo1.Lines.Add ((floattostr(a1.value))+' + '+(floattostr(a2.value))+' + '+(floattostr(a3.value));
//do something
Memo1.Lines.Add ((floattostr(a1.value))+' + '+(floattostr(a2.value))+' + '+(floattostr(a3.value));
//do something
Memo1.Lines.Add ((floattostr(a1.value))+' + '+(floattostr(a2.value))+' + '+(floattostr(a3.value));
Application.ProcessMessages;
if GetKeyState(VK_Escape) AND 128 = 128 then break;
end;
end;
The loop is very slow. To generate 2,000,000 lines it needs 2:45 hours. As it continues, it gets slower and slower still.
Any help to this problem of mine is greatly appreciated.
Regards,
marygreen