Memo1.Lines.Add(Format('加载的文件数(%d)', [uds.Count]));这里的%d怎么用的?????

解决方案 »

  1.   

    %d : 整数
    %e : 科学式
    %f : 定点实数
    %g : 实数
    %n : 实数(-d,ddd,ddd.dd ...)
    %m: 金钱格式
    %p : point
    %s : 字串
    %x : Hex
      

  2.   

    %d会换成uds.Count值与这样写效果一样
    Memo1.Lines.Add('加载的文件数('+inttostr(uds.Count)+')'); 
    当然是用FORMAT简便
      

  3.   


    format格式化输出
    http://www.cnblogs.com/del/archive/2007/12/18/1005161.html
      

  4.   


    var
      SysTime : TSystemTime;
      DateFile : string;
    begin
      ...
      GetLocalTime(SysTime);
      DateFile := Format('%.4d',[SysTime.wYear]) + Format('%.2d',[SysTime.wMonth])  +
                  Format('%.2d',[SysTime.wDay]);
      ...
    end