round的帮助中的例子也是这么写的。为什么有提示"incompatible types:'string'and 'int64'"??
  请高手指点。

解决方案 »

  1.   

    我试过了,没有出错,我用的是delphi5,win200.
      

  2.   

    我这样做没有什么问题,你用的是什么版本 
     label1.Caption :=inttostr(round(1.50));
      

  3.   

    e:=(v/v1);
       imagej[0].Canvas.TextOut(x,y,'Len:'+inttostr(round(e*10)+'mm');
      其中e,v,v1:real;
      

  4.   

    我是想执行上面的语句,出错了,我执行imagej[0].Canvas.TextOut(x,y,'Len:'+inttostr(round(1.5))+'mm');也出错
      

  5.   

    我试过了你上面的代码,没有问题。你用的是哪个版本。有可能是你的delphi环境出错了,检查一下。如果还不行,重装delphi.
      

  6.   

    你的imagej[0] 是如何定义的。
      

  7.   

    inttostr(round(e*10)+'mm')
    MM从里面移出来。。
    'Len:'+IntToStr(Round(E*10))+'mm'
      

  8.   

    'mm'去掉可以执行了,但我想用‘mm’作单位,那该咋办?
      

  9.   

    按 canvas.TextOut(100,100,'len:'+inttostr(round(e*10)) +'mm' );
    这样写没错的。‘mm’可作单位