Function CurrToCharNum(Number:Real):String;
var I,J,m,leng,leng1:Integer;
Str,Strs,s1,s2,s3:String;
const China:Array[1..10,1..2] of String=
(('0','零'),('1','壹'),('2','贰'),('3','叁'),('4','肆'),
('5','伍'),('6','陆'),('7','柒'),('8','捌'),('9','玖'));
Asi:Array[1..12] of String=('拾','亿','仟','佰','拾','万','仟','佰','拾','元','角','分');
begin
if Number>=2147483646.999 then
begin
ShowMessage('最大数只可支持到2147483646.99元');
Abort;
end;
m:=0;
Result :='';
Str:=IntToStr(Trunc(Number));
S1:=IntToStr(Round(100*(Number-int(Number))));
if length(s1)=1 then
S1:='0'+S1;
if length(s1)=0 then
S1:='00';
Str:=Str+S1;
leng:=length(Str);
for I :=lengdo
wnto 1do
begin
Strs:=copy(Str,I,1);
for J :=1 to 10do
if Strs=China[J,1] then
Strs :=China[J,2];
Result :=Strs+Asi[12-m] + Result;
m:=m+1;
end;
leng1:=length(Result);
s2:=copy(Result,leng1-7,8);
s3:=copy(Result,1,leng1-8);
if s2='零角零分' then
Result :=s3+'整';
end;