[Lazarus] Format an integer with thousandseparators by function format()

Michael Van Canneyt michael at freepascal.org
Fri Feb 17 23:13:32 CET 2023



On Fri, 17 Feb 2023, John Landmesser via lazarus wrote:

> Hi,
>
> this one works, but i don't know why to devide the integer by 1:
>
>
>     fmt := '%.0n';
>     s1 := Format(fmt,[MyInteger/*1*]);

Because the result of the division is a float; not an integer.
And  %n will only format a float, not an integer.

Michael.


More information about the lazarus mailing list