人民币小写转大写_VB.net_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

人民币小写转大写

作者:黑客防线网安VB教程基地 来源:黑客防线网安VB教程基地 浏览次数:0

本篇关键词:人民币ReplaceEndIfFori
黑客防线网安网讯:->PublicFunctionZDX(XAsCurrency)AsString  DimlnPAsInteger  DimPrcAsString  DimTmpAsString  DimNoBAsCurrency  DimDxAsString  DimXxAsString  DimZhenAsBoolean  Dim...
->PublicFunctionZDX(XAsCurrency)AsString
  DimlnPAsInteger
  DimPrcAsString
  DimTmpAsString
  DimNoBAsCurrency
  DimDxAsString
  DimXxAsString
  DimZhenAsBoolean
  DimStr(10)AsString
  DimChinaAsString
  China="分角元拾佰仟万拾佰仟亿"
  Str(0)="零"
  Str(1)="壹"
  Str(2)="贰"
  Str(3)="叁"
  Str(4)="肆"
  Str(5)="伍"
  Str(6)="陆"
  Str(7)="柒"
  Str(8)="捌"
  Str(9)="玖"
  
  Zhen=True
  X=FormatNumber(X,2)
  Prc=CStr(X)
  Prc=Replace(Prc,",","")
  
  lnP=Len(Prc)
  Fori=lnP-1To1Step-1
  IfMid(Prc,i,1)="."Then
  SelectCaselnP-i
  Case1
  Prc=Replace(Prc,".","") "0"
  Case2
  Prc=Replace(Prc,".","")
  EndSelect
  Zhen=False
  ExitFor
  EndIf
  Nexti
  IfZhenThenPrc=Prc "00"
  lnP=Len(Prc)
  Fori=1TolnP
  Tmp=Str(Mid(Prc,i,1))&Tmp
  Nexti
  
  ZDX=""
  fy=1
  Fori=1TolnP
  Xx=Mid(Tmp,i,1)
  Dx=Mid(China,i,1)
  
  IfXx<>"零"Then
  ZDX=Xx&Dx&ZDX
  f=1
  Else
  Ifi=3Then
  ZDX=Dx&ZDX
  EndIf
  
  Ifi=7Then
  ZDX=Dx&ZDX
  EndIf
  IffThen
  ZDX="零"&ZDX
  EndIf
  f=0
  EndIf
  Nexti
  IfZhenThenZDX=ZDX "正"
  ZDX=Replace(ZDX,"零万","万")
  ZDX=Replace(ZDX,"零元","元")
  
  EndFunction->
->

    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-14489-1.html
网站维护教程更新时间:2012-04-03 01:07:31  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer