> > How's the best way of converting an integer number "208" (that is
 > > pence) into a string value that is in pounds (2.08)

Here's another variant that provides an optional $, £ or €

uses math;
function PenceToString(pennies: integer; precision: integer=2;
                       currency: string=''): string;
begin
 Result:= Format(Format(currency+'%%.%df',[precision]),
                 [pennies/(10**precision)]);
end;



--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to