以下表达逻辑有错吗? str:='';
for c:=0 to 1000 do
if 5个条件满足 then
begin
str1:=inttostr(c);
break;
end
else
if 4个条件满足 then
begin
str2:=inttostr(c);
break;
end
else
if 3个条件满足 then
begin
str3:=inttostr(c);
break;
end
else
if 2个条件满足 then
begin
str4:=inttostr(c);
break;
end;
else
if 1个条件满足 then
begin
str5:=inttostr(c);
break;
end;
for c:=0 to 1000 do
if 5个条件满足 then
begin
str1:=inttostr(c);
break;
end
else
if 4个条件满足 then
begin
str2:=inttostr(c);
break;
end
else
if 3个条件满足 then
begin
str3:=inttostr(c);
break;
end
else
if 2个条件满足 then
begin
str4:=inttostr(c);
break;
end;
else
if 1个条件满足 then
begin
str5:=inttostr(c);
break;
end;
for c:=0 to 1000 do
if 5个条件满足 then
begin
str1:=inttostr(c);
break;
end
else
if 4个条件满足 then
begin
str2:=inttostr(c);
break;
end
else
if 3个条件满足 then
begin
str3:=inttostr(c);
break;
end
else
if 2个条件满足 then
begin
str4:=inttostr(c);
break;
end; 把分号去掉
else
if 1个条件满足 then
begin
str5:=inttostr(c);
break;
end;