这也只是一个学习的例子
function MoneySwap(money: real): string;
const
moneyunit = '分角元拾百千万拾百千亿拾百千万';
moneyvalue = '零壹贰叁肆伍陆柒捌玖拾';
var
NewMoney, Smoney: string;
i: integer;
begin
money := int(money * 100);
Smoney := floattostr(money);
for i := 1 to length(Smoney) do begin
NewMoney := NewMoney + copy(moneyvalue, strtoint(copy(Smoney, i, 1)) * 2 + 1, 2) + copy(moneyunit, (length(Smoney) - i) * 2 + 1, 2);
end;
MoneySwap:=NewMoney;
end;