Выводит ошибки в таймере(находиться в конце).
Код:
var
Form1: TForm1;
a,b,c,d:integer;
i: integer;
arr: array of integer;
v1,v2:integer;
l: string;
implementation
{$R *.dfm}
procedure TForm1.Button3Click(Sender: TObject);
begin
i:=i+1;
arr[i]:=3;
a:=radiogroup1.ItemIndex;
l:=button3.Caption;
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
i:=i+1;
arr[i]:=6;
a:=radiogroup2.itemindex;
l:=button6.Caption;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
i:=i+1;
arr[i]:=1;
button1.Caption:=l;
v1:=a;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
i:=i+1;
arr[i]:=2;
button2.Caption:=l;
v2:=a;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
i:=i+1;
arr[i]:=4;
b:=v1 and v2;
a:=1-b;
label1.caption:=inttostr(a);
l:=button4.Caption;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
i:=i+1;
arr[i]:=5;
Memo2.Text:=IntToStr(a);
Timer1.Enabled:=True;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
for i := Low(arr) to High(arr) do \[Warning] Unit1.pas(103): For loop control variable must be simple local variable
(FindComponent('Button' + IntToStr(arr[i])) as TButton).OnClick;\[Error] Unit1.pas(104): Not enough actual parameters
end;
end.