随笔 - 2146  文章 - 97 评论 - 11769 trackbacks - 253

举例:
var
  s: string;
begin
  Str(123, s);
  ShowMessage(s);  {123}

  Str(PI, s);
  ShowMessage(s);  {3.14159265358979E+0000}

  Str(PI:0:2, s);
  ShowMessage(s);  {3.14}

  Str(9.1:1:3, s);
  ShowMessage(s);  {9.100}

  Str(100:5, s);
  ShowMessage('^' + s);  {^  100}
end;

System 单元下的公用函数目录

posted on 2008-03-29 22:43  万一  阅读(...)  评论(...编辑  收藏