str convert(real n)
{
container str1 = ["元", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿"];
container str2 = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"];
container str3 = ["角","分"];
str temp;
str temp1;
str temp2;
str MoneyStr;
int k =-1 ;
int len = -1;
int i;
str sb;
;
temp = strfmt('%1',n);
temp1 = strReplace(substr(temp,0,strfind(temp,".",0,strlen(temp))-1),',','');
temp2 =substr(temp,strfind(temp,".",0,strlen(temp))+1,strlen(temp));
for( i=0; i<strlen(temp1); i++)
{
len = strlen(temp1)-1;
sb = substr(temp1,i+1, 1);
k = str2int(sb);
MoneyStr += conPeek(str2,k+1) + conPeek(str1,len-i+1);
}
for( i=0; i<2; i++)
{
sb = substr(temp2,i+1,1);
k = str2int(sb);
MoneyStr += conPeek(str2,k+1)+ conPeek(str3,i+1);
}
return MoneyStr;
}