if listbox1.Items.Count>2 then
begin
for t:=1 to i-1 do if shuzu1[t]=shuzu1[i] then
showmessage('重复的进程名')
else
t:=t+1;
end
end;
其中i=listbox1.items.count 。shuzu1 里面放的就是Items 。
begin
for t:=1 to i-1 do if shuzu1[t]=shuzu1[i] then
showmessage('重复的进程名')
else
t:=t+1;
end
end;
其中i=listbox1.items.count 。shuzu1 里面放的就是Items 。
while t<=i-1 do
begin
if shuzu1[t]=shuzu1[i] then
begin
showmessage('重复的进程名')
break;
end;
t:=t+1;
end;
if listbox1.Items.Count>2 then
begin
for t:=1 to i-1 do if shuzu1[t]=shuzu1[i] then
showmessage('重复的进程名');
end
end;
begin
if shuzu1[t]=shuzu1[i-1] then
showmessage('重复的进程名')
else
t:=t+1;
end;
Assignment to FOR-loop variable 't'