党
党sir
Unregistered / Unconfirmed
GUEST, unregistred user!
请问高手如何简化下面的程序:
VAR
i:integer;
begin
...
case i of
1: label1.color:=clred;
2: label2.color:=clred;
3: label3.color:=clred;
4: label4.color:=clred;
5: label5.color:=clred;
6: label6.color:=clred;
7: label7.color:=clred;
...
end;
end;
VAR
i:integer;
begin
...
case i of
1: label1.color:=clred;
2: label2.color:=clred;
3: label3.color:=clred;
4: label4.color:=clred;
5: label5.color:=clred;
6: label6.color:=clred;
7: label7.color:=clred;
...
end;
end;