s:=edit1.text;
delete(s,length(s)-1,1);

解决方案 »

  1.   

    tingweb的方法是對的,我也編寫過計算器!!!
      

  2.   

    s:=edit1.text;
    delete(s,length(s),1);
    edit1.text:=s;
    减1干什么?
    另,属性不能作为变参,如
    delete(edit1.text,length(edit1.text),1) 是错误的.
      

  3.   

    If you store the current number to a variable, supposing x,
    if x is an integer, x:=x div 10
    if x is a float, analyze its fraction part, delete the last digit.