光知道是STR()是把数字形转化成字符串形!~!
但是,里面的参数不是很懂,具体话后,就更是不明白了 ~~
请高手指点一下~~谢谢 ~~~

解决方案 »

  1.   

    IntToStr(i:integer):String;if IntToStr(145)='145' then
      ShowMessage('等价');说实话我用啦DELPHI这么久,STR可以直接转换也是在这里听你说过,55555555555555555
    太菜啦没办法。
      

  2.   

    呵呵!!~哎~!~
    但是你如何解释,我那个passcal中的,STR()函数呢!!!
      

  3.   

    Delphi syntax:procedure Str(X [: Width [: Decimals ]]; var S);DescriptionIn Delphi code, Str converts X to a string representation according to the Width and Decimals formatting parameters. The effect is like a call to Write except the resulting string is stored in S instead of being written to a text file.X is an integer-type or real-type expression. Width and Decimals are integer-type expressions. S is a string-type variable or a zero-based character array variable if extended syntax is enabled.
    ..............................
    var
      max1:real;
      s:string;
    begin
     max1:=1111.2345;
     str(max1:6:1,s );
    showmessage(s);//          1111.2
    end;
    ......
      str(max1:6:2,s );//      1111.23......