string upper_number[10]={"壹","贰","叁","肆","伍","陆","柒","捌","玖","拾"}
string number_dw[13]={"圆","拾","佰","仟","万","拾","佰","仟","亿","拾","佰","仟","万"}
string operate,upper_str
int i,j,point_pos,int_len
je = round(je,2)
if je=0 OR je=0.00 then
return "零圆整"
end if
upper_str=""
operate=string(round(abs(je),2))
point_pos=pos(operate,".")
if point_pos=0 then
int_len=len(operate)
else
int_len=point_pos - 1
end if
if abs(je)>0 then
for i=1 to int_len
j=int_len - i + 1
if i>1 AND mid(operate,i,1)="0" then
if mid(operate,i - 1,1)<>"0" AND number_dw[j]<>"万" AND number_dw[j]<>"亿" AND number_dw[j]<>"圆" then
upper_str=upper_str+"零"
elseif number_dw[j]="万" OR number_dw[j]="亿" OR number_dw[j]="圆" then
if right(upper_str,2)<>"零" then
if right(upper_str,2)<>"亿" AND right(upper_str,2)<>"万" then
if right(upper_str,2)="拾" AND number_dw[j]<>"圆" then
upper_str=upper_str+number_dw[j]+"零"
else
upper_str=upper_str+number_dw[j]
end if
end if
else
if (mid(upper_str,len(upper_str) - 3,2)<>"亿" AND mid(upper_str,len(upper_str) - 3,2)<>"万") OR number_dw[j]="圆" then
upper_str=left(upper_str,len(upper_str) - 2)+number_dw[j]
if number_dw[j]<>"圆" then
upper_str=upper_str+"零"
end if
end if
end if
end if
elseif i=1 and int_len=1 and mid(operate,i,1)='0' then
upper_str=""
else
upper_str=upper_str+upper_number[integer(mid(operate,i,1))]+number_dw[j]
end if
next
end if
if point_pos>0 then
if mid(operate,point_pos+1,1)<>"0" then
upper_str=upper_str+upper_number[integer(mid(operate,point_pos+1,1))]+"角"
if mid(operate,point_pos+2,1)<>"0" then
upper_str=upper_str+upper_number[integer(mid(operate,point_pos+2,1))]+"分"
end if
else
if mid(operate,point_pos+2,1)<>"0" then
if upper_str="" then
upper_str=upper_number[integer(mid(operate,point_pos+2,1))]+"分"
else
upper_str=upper_str+"零"+upper_number[integer(mid(operate,point_pos+2,1))]+"分"
end if
end if
end if
end if
if Right(Trim(upper_str),2)<>"分" then
upper_str=upper_str+"整"
end if
if je<0 then upper_str="(负)"+upper_str
return upper_str