Сел учить потоки и в самом начале возникла проблема. Вот пример с книжки:
Форма:
Код:
procedure TForm1.Button1Click(Sender: TObject);
begin
co:=TCountObj.Create(true);
co.Resume;
co.Priority:=tpLower;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
co.Terminate;
end;
Поток:
Код:
procedure TCountObj.Execute;
begin
FreeOnTerminate:=true;
index:=1;
while index>0 do
begin
Synchronize(UpdateLabel);
Inc(index);
if index>100000 then
index:=0;
if terminated then
exit;
end;
end;
procedure TCountObj.UpdateLabel;
begin
Form1.Label1.Caption:=inttostr(index);
end;
Проблема в том что в потоке не работает inttostr. Пишет Undecleared identifier 'inttostr'. Использую Delphi 2010. С чем это может быть связано?