正在装载数据…… Format
Format(const Format: string;const Args: array of string ): string;
-----------------------------------------------------------------------------
Unit SysUtils
函数原型 procedure FmtStr(var Result: string; const Format: string;
const Args: array of const);
function Format(const Format: string; const Args: array of
const): string;
说明 %d : 整数
%e : 科学式
%f : 定点实数
%g : 实数
%n : 实数(-d,ddd,ddd.dd ...)
%m: 金钱格式
%p : point
%s : 字串
%x : Hex
范例 var
i: Integer;
j: Double;
s: String;
t: String;
begin
t:=Format('%d %8.2f %s',[i,j,s]);
ListBox1.Item.Add(t);
end;

BubbleSeries1.PercentFormat := '##0.0# %';
Example
procedure TForm1.Table1AfterDelete(DataSet: TDataSet);
begin
StatusBar1.SimpleText := Format('There are now %d records in the table', [DataSet.RecordCount]);
end;

S:= Format( '1-? ??????? ??????? - %d, 2-? - %d, 3-? - %d', [10,20,30] );




Format( '%*.*f', [ 9, 2, 12345.6789 ] );
Format( '%9.2f', [ 12345.6789 ] );
Format( '%3d, %d, %0:d, %2:-4d, %d', [ 1, 2, 3, 4 ] );
' 1,2,1,3 ,4'


## AfterDelete, Format Example 本文来源:http://blog.csdn.net/cnhnjxxz/archive/2007/08/22/1754742.aspx
|