AnsiString GetBigMoney(AnsiString s)
{
if ((s.Length()<=8) && (s.ToIntDef(0)==0)) return "幣零元零角整";
AnsiString odxc,odxs,oszc,oscc,oscc0; int oi,oi0,i;
double ormb=StrToFloat(s); //金額小寫
if (ormb==0.00) return "幣零元零角整";
odxc="分角圓拾佰仟萬拾佰仟億拾佰仟萬拾佰仟億";
odxs="零壹貳三肆伍陸柒捌玖";
oszc=FloatToStr(abs(ormb));
i=AnsiPos('.',s);
oszc.Delete(i,1); // stuf(oszc,18,1,'');
oszc=Trim(oszc); oscc=""; oi0=0;
for (oi=oszc.Length();oi>0;oi--)
{ oscc=odxc.SubString(oi0*2+1,2)+oscc; oscc=odxs.SubString(StrToInt(oszc.SubString(oi,1))*2+1,2)+oscc;
oi0++; }
oscc0="";
for (oi=1;oi<=oscc.Length();oi=oi+4)
{ if (oscc.SubString(oi,2)=="零" )
{ if ( oscc.SubString(oi+2,2)=="萬" )
{ if ( oscc0.SubString(oscc0.Length()-3,4)!="億零" )
{ if (oscc0.SubString(oscc0.Length()-1,2)=="零" )
oscc0=oscc0.SubString(1,oscc0.Length()-2)+"萬";
else oscc0=oscc0+"萬"; }
continue; }
if ( oscc.SubString(oi+2,2)=="圓")
{
if (oscc0.SubString(oscc0.Length()-1,2)=="零")
oscc0=oscc0.SubString(1,oscc0.Length()-2)+"圓";
else oscc0=oscc0+"圓";
continue;
}
if ( oscc.SubString(oi+2,2)=="億" )
{
if (oscc0.SubString(oscc0.Length()-1,2)=="零")
oscc0=oscc0.SubString(1,oscc0.Length()-2)+"億";
else oscc0=oscc0+"億";
continue; }
if (oscc0.SubString(oscc0.Length()-1,2)!="零" )
oscc0=oscc0+"零";
}
else oscc0=oscc0+oscc.SubString(oi,4);
}
if ((oscc0.SubString(oscc0.Length()-3,4)=="圓零") )
{ oscc0=oscc0.SubString(1,oscc0.Length()-2)+"整";
return "幣"+oscc0; }
if ((oscc0.SubString(oscc0.Length()-3,4)=="角零" ))
{ oscc0=oscc0.SubString(1,oscc0.Length()-2)+"整";
return "幣"+oscc0;
}
if ((oscc0.SubString(oscc0.Length()-1,2)=="零" ))
oscc0=oscc0.SubString(1,oscc0.Length()-2)+"圓整";
return "幣"+oscc0;
}