数字转换为大写(vfp)

<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 728x15, 创建于 08-4-23MSDN */ google_ad_slot = "3624277373"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 160x600, 创建于 08-4-23MSDN */ google_ad_slot = "4367022601"; google_ad_width = 160; google_ad_height = 600; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>

PARAMETERS lnMoney
lnNumber = lnMoney
ChinaMoney = ""
DIME ChinaNo(10)
ChinaNo(1) = "零"
ChinaNo(2) = "壹"
ChinaNo(3) = "贰"
ChinaNo(4) = "叁"
ChinaNo(5) = "肆"
ChinaNo(6) = "伍"
ChinaNo(7) = "陆"
ChinaNo(8) = "柒"
ChinaNo(9) = "捌"
ChinaNo(10) = "玖"
DIME Cdw(2)
Cdw(1)="角"
Cdw(2)="分"
DIME ChinaNum(10)
ChinaNum(1) = "元"
ChinaNum(2) = "拾"
ChinaNum(3) = "佰"
ChinaNum(4) = "仟"
ChinaNum(5) = "万"
ChinaNum(6) = "拾"
ChinaNum(7) = "佰"
ChinaNum(8) = "仟"
ChinaNum(9) = "亿"
ChinaNum(10) = "拾"
lnIntNumber = INT(lnNumber)
lcIntNumber = ALLTRIM(STR(lnIntNumber,10,0))
lnDicNumber = Int((lnNumber-lnIntNumber)*100)
lcDicNumber = IIF(!EMPTY(lnDicNumber),STR(lnDicNumber,2,0),"")

N = 1
FOR I = LEN(lcIntNumber) TO 1 STEP -1
 FOR J = 1 TO 10
  IF VAL(SUBST(lcIntNumber,I,1)) = J-1
   ChinaMoney = ChinaNo(J)+ChinaNum(N)+ChinaMoney
   N = N+1
   EXIT
  ENDIF
 ENDFOR
ENDFOR
IF !EMPTY(lcDicNumber)
 FOR Z = 1 TO 2
  FOR P = 1 TO 10
   IF VAL(SUBST(lcDicNumber,Z,1)) = P-1
    ChinaMoney = ChinaMoney+ChinaNo(P)+Cdw(Z)
    EXIT
   ENDIF
  ENDFOR
 ENDFOR
ELSE
 ChinaMoney=ChinaMoney+"整"
ENDIF
RETURN ChinaMoney

<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 728x15, 创建于 08-4-23MSDN */ google_ad_slot = "3624277373"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 160x600, 创建于 08-4-23MSDN */ google_ad_slot = "4367022601"; google_ad_width = 160; google_ad_height = 600; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
阅读更多
文章标签: parameters
个人分类: 数据库
想对作者说点什么? 我来说一句

数字转换为中文大写代码

2010年04月24日 2KB 下载

数字转换大写

2013年11月21日 4KB 下载

阿拉伯数字转换大写汉字

2008年06月05日 5KB 下载

阿拉伯数字转换为中文大写

2011年01月04日 20KB 下载

jquery 数字转换成中文大写

2014年08月04日 30KB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭