- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


Frequently Asked Questions

Formatting and displaying integers with commas

Question:

How can I easily display an integer value with commas every three digits?

Answer:

The following example demonstrates displaying an integer value 
with thousand separators. Note that the actual character used 
to separate the digits will depend on the local (country) system 
settings. 

procedure TForm1.Button1Click(Sender: TObject);
var
  i : integer;
begin
  i := 12345678;
  Memo1.Lines.Add(FormatFloat('#,', i));
end;




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile