That really doesn't solve the problem.OK. I have no idea why though it has all the writeln abilities and it formats everything to a string that you can use anywhere you like.
I am not worried about the length of the number or the number of digits after the decimal, what I want it to do is fit a column that is, say, 12 or 22 or 33 column spaces wide either right or left aligned in the column.Well the code I posted, at least in my installation, will right align the string with the proper number of spaces in front to fill the 22 spaces you defined.
How do you do that?Personally I use a set of padStr functions I wrote long ago for delphi. Something along the lines of
And it is worse and different for different printers. What I show here is almost okay for a Brother pinter, but not for a Canon printer. So, how do I fix the width of the floattostr without going to Grid or Canvas which makes everything much more complicated. Seems like FPC needs to be able to do this like other languages do.It sounds like the problem is that the default font chosen the printers you have tested with your Pascal code is proportional, not fixed width (monospaced). I'm not familiar with the PU printer unit, check if it has a config method where the font type can be specified to e.g. Courier etc.