[Lazarus] Converting pence into pounds and then to string

Graeme Geldenhuys graeme at geldenhuys.co.uk
Wed Dec 12 13:04:03 CET 2012


On 2012-12-12 11:23, Richard Mace wrote:
> 
> How's the best way of converting an integer number "208" (that is pence)
> into a string value that is in pounds (2.08)

Divide by 100. Then use FormatFloat() to output as string.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/





More information about the Lazarus mailing list