x:=StrToInt(Edit1.Text);
     y:=StrToInt(Edit2.Text);
        Edit3:=IntToStr(x+y);这样对吗

解决方案 »

  1.   

    如果x、y是Integer的话,没错儿
    不过当StrToInt传入字串的不符合整数形式的话,会报错
      

  2.   

      x:=StrToInt(Edit1.Text); 
      y:=StrToInt(Edit2.Text);
      Edit3.Text:=IntToStr(x+y);显示需要用Text属性。
      

  3.   

    xy是Integer类型的不过它报错了报错的就是这样
    [Error] Unit1.pas(54): Incompatible types: 'TEdit' and 'String'
    [Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
      

  4.   


    1.显示需要用Text属性;
    2.当然要判断输入的text能不能转换为integer.