if ((edit16.Text='6.5') or (edit16.Text='8') or (edit16.Text='10') or (edit16.Text='12')) and ((strtofloat(label54.Caption) >= -7) and (strtofloat(label54.Caption) <= 7)) then
begin
label58.Caption:='合格'
else
label58.Caption:='不合格';
endelse if ((edit16.Text='14') or (edit16.Text='16') or (edit16.Text='18') or (edit16.Text='20')) and ((strtofloat(label54.Caption) >= -7) and (strtofloat(label54.Caption) <= 7)) then
begin
label58.Caption:='合格'
else
label58.Caption:='不合格';
end
   end;
不能执行啊~!初学,不太懂~ 

解决方案 »

  1.   

    不会吧,你不是发过帖子了吗
    if ((edit16.Text='6.5') or (edit16.Text='8') or (edit16.Text='10') or (edit16.Text='12')) and ((strtofloat(label54.Caption) >= -7) and (strtofloat(label54.Caption) <= 7) or
    (edit16.Text='14') or (edit16.Text='16') or (edit16.Text='18') or (edit16.Text='20'))) then
    begin
    label58.Caption:='合格'
    else
    label58.Caption:='不合格';
    end
      

  2.   


    if ((StrToInt(edit16.Text) in [8,10,12]) or (edit16.Text='6.5')) and ((StrToInt(label54.Caption) >= -7) and (strtoint(label54.Caption) <= 7)) then
      label58.Caption:='达到要求'
    else
      label58.Caption:='合格';
    Lz上次不是回复你了吗,,晕死了
      

  3.   

    是的~!else 出现问题,不知道是怎么回事
      

  4.   

    begin
    label58.Caption:='合格'
    else
    label58.Caption:='不合格';
    endif ((edit16.Text='6.5') or (edit16.Text='8') or (edit16.Text='10') or (edit16.Text='12')) and ((strtofloat(label54.Caption) >= -7) and (strtofloat(label54.Caption) <= 7)) thenbegin
    label58.Caption:='合格';
    end
    else
    begin
    label58.Caption:='不合格';
    end;
    或者改成
    if ((edit16.Text='6.5') or (edit16.Text='8') or (edit16.Text='10') or (edit16.Text='12')) and ((strtofloat(label54.Caption) >= -7) and (strtofloat(label54.Caption) <= 7)) then
    label58.Caption:='合格'
    else
    label58.Caption:='不合格';
    已经很祥细了,再祥细我就没办法了
      

  5.   

    else if 又出错,请问? 谢谢,不好意
      

  6.   

    if then
    begin
    end
    else
    begin
    end;