[Lazarus] Converting an Integer of pence into pounds

Alexsander Rosa alexsander.rosa at gmail.com
Wed Sep 26 14:37:29 CEST 2012


You mean:

*var *pence: integer;
pounds: currency;
strval: string;
*begin*
pence := 650;
pounds := pence / 100.0;
strval := currtostr(pounds);


2012/9/26 Richard Mace <richard.mace at gmail.com>

> Hi All,
> I am having a bit of a mind block!
> What would be the code to convert an Integer of pence e.g. 650 into a
> value of pounds e.g. 6.50 and then convert to a string value of "6.50"?
>
> Thanks in advance
>
> Richard
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>


-- 
Atenciosamente,
Alexsander da Rosa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120926/1504a7c9/attachment-0003.html>


More information about the Lazarus mailing list