Re: Printf Problem
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Mar 07, 2005
- 577 views
On Thu, 03 Mar 2005 08:43:11 -0800, David Mosley <guest at RapidEuphoria.com> wrote: >Hi >I have a problem with printf I need to get this output >1.000.00 I have a financial formatting routine which will handle this: http://palacebuilders.pwp.blueyonder.co.uk/effmt.html You can get the above output using: puts(1,ffmt(1000,".0.2")) or puts(1,ffmt(1000,"..2")) where the format string (".0.2") is: <no currency symbol> <use '.' as thousands separator> <field width of 0: no zero-fill, return unjustified> <decimal separator is '.'> <print 2 decimal places> <no thousands/millions indicator> <no special credit/debit indicator> Regards, Pete