将数字金额转换为大写金额

时间:2016-10-01 13:40:19
【文件属性】:

文件名称:将数字金额转换为大写金额

文件大小:2KB

文件格式:TXT

更新时间:2016-10-01 13:40:19

金额转换

string skedx,ls_ske,ls_dx[] int i,n,l skedx='' for n=0 to 9 choose case n case 0 ls_dx[n+1]='零' case 1 ls_dx[n+1]='壹' case 2 ls_dx[n+1]='贰' case 3 ls_dx[n+1]='叁' case 4 ls_dx[n+1]='肆' case 5 ls_dx[n+1]='伍' case 6 ls_dx[n+1]='陆' case 7 ls_dx[n+1]='柒' case 8 ls_dx[n+1]='捌' case 9 ls_dx[n+1]='玖' end choose next ls_ske=trim(string(round(abs(aje)*100,0))) l=len(ls_ske) for i=1 to l n=integer(left(right(ls_ske,i),1)) CHOOSE CASE i CASE 1 if n=0 then skedx="零分" else skedx=ls_dx[n+1]+"分"+skedx end if CASE 2 if n=0 then skedx="零角"+skedx else skedx=ls_dx[n+1]+"角"+skedx end if CASE 3 if n=0 then skedx="零元"+skedx else skedx=ls_dx[n+1]+"元"+skedx end if CASE 4 if n=0 then skedx="零拾"+skedx else skedx=ls_dx[n+1]+"拾"+skedx end if CASE 5 if n=0 then skedx="零佰"+skedx else skedx=ls_dx[n+1]+"佰"+skedx end if CASE 6 if n=0 then skedx="零仟"+skedx else skedx=ls_dx[n+1]+"仟"+skedx end if CASE 7 if n=0 then skedx="零万"+skedx else skedx=ls_dx[n+1]+"万"+skedx end if CASE 8 if n=0 then skedx="零拾"+skedx else skedx=ls_dx[n+1]+"拾"+skedx end if CASE 9 if n=0 then skedx="零佰"+skedx else skedx=ls_dx[n+1]+"佰"+skedx end if END CHOOSE next if aje<0 then skedx='负'+skedx end if return(skedx)


网友评论