function chnumstr(n)
dim i,j,k,strlen,retval,x,y,z,str,str1
z=array("零","一","二","三","四","五","六","七","把","九")
y=array("","十","百","千")
x=Array("","万","亿","万万亿")
strlen=len(n)
str1=n
for i= 1 to strlen
j=mid(str1,i,1)
retval=retval&z(j)
if j>0 then retval=retval&y((strlen-i) mod 4)
retval=replace(retval,z(0)&z(0),z(0))
if ((strlen-i) mod 4)=0 and right(retval,1)=z(0) then retval=left(retval,len(retval)-1)
if ((strlen-i) mod 4)=0 then retval=retval&x(int((strlen-i)/4))
next
chnumstr=retval
end function
阅读(682) | 评论(0) | 转发(0) |