以下表达逻辑有错吗?   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;
   

解决方案 »

  1.   

     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; 
      

  2.   

    基本没问题,就是不知道条件之间有没有问题。中间的一个end多了个;
      

  3.   

    眼拙,没看见,还是hihihi眼尖