I need to format a real number with leading zeros in the whole number part prior to the decimal point. I know how to achieve this with integers, but the syntax for reals escapes me.
Number := 1.234 ;
SNumber := Format ('%2.3f', [Number]) ;
This gives SNumber = ' 1.234'
but I want '01.234'
. Number
is always 0..99.999
01.230
. On the basis of the syntax to include leading zeros I assume thatFormatFloat ('0#.##0', Number) ;
is what I want - it seems to work. – Doble