Thanks,
Gino Costa
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
>I'm using Delphi 6 PRO. If I have a lerge (over 1,000) number stored in an
>integer, is there a way I can add commas or . or the other character to
>seperate thousands, depending on the country, if I add the value to a
>string, as if I'm using IntToStr ()?
>
Use Format() function. Look up "format strings" in help.
MyStr := Format('%.0n', [MyInteger * 1.0]);
The function needs a floating point type, and the " * 1.0" fools it into taking
an integer. The separators are taken from window's thousand separator and so
are whatever is required in the country of use.
The Format() function is a good one to get to know, you can include other text
in the formatting string so do not have to code concatenation ...
MyStr := Format('Size is %.0n whatnots', [MyInteger * 1.0]);
Alan Lloyd
alang...@aol.com