I'm looking for a way to format numerical data in a string so that everything 
ends up aligned by the decimal point. 
I've been trying to use the Format() function but I don't see how to do what I 
am looking for... 
then again I don't really understand the format() function, and most of the 
examples show exponents, which I do not want.

My input variables are all Doubles and I want the result to be padded with 
spaces before the decimal point if needed and 
trailing zeros to be replaced with spaces so that it always is the same total 
width and the decimal point is always in the same position.
The string will later be either output to the console or saved into a file.  It 
will only ever be viewed with a fixed width font.

Does anyone have any idea if this can be done with any function included with 
FPC or am I going to write my own function to do this?

James


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to