惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
T
The Blog of Author Tim Ferriss
B
Blog
L
LangChain Blog
Y
Y Combinator Blog
美团技术团队
博客园 - 三生石上(FineUI控件)
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
量子位
博客园_首页
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
C
Check Point Blog
D
Docker
小众软件
小众软件
The Cloudflare Blog
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
IT之家
IT之家

博客园 - 明月伴我行

摆脱烦人的Google.cn 淘宝助理CSV文件导入后无法显示宝贝图片的解决办法 Orcas 将不包括ADO.NET Entity Framework 用WINDOWS FORM写阻抗机3540、3541测量程序 Firefox中文字型的设置 Sharepoint server 2007 中文版出来了,msdn订阅用户可以下载了 Virtual Server+Vmware+WideScreen Solve problem searching file in Emule and error occurs:Please Use Emule 0.47c And Enable Protocol Obfuscation To Get Results 要找1-2个美工,有合适的人联系看看 含有运算符的STRING得到计算结果,类似JS的EVAL 發布asp.net 2.0項目中出現的錯誤,請各位指點。 Today is my birthday 產生隨機數 表单验证类 INI类 安裝Visual Studio 2005 July CTP 中的Visio辦法 郁悶,寫了幾個星期的asp程序 自定格式字串formatstring: WebGrid.net 3.5 Column圖像鏈接的用法
人民幣小寫金額轉換為大寫函數
明月伴我行 · 2005-08-15 · via 博客园 - 明月伴我行

<%function Money(thenumber)
dim Money,i,String1,String2,length,checkp'定义变量
dim one(),onestr()'定义数组

String1 
= "零壹贰叁肆伍陆柒捌玖"
String2 = "万仟佰拾亿仟佰拾万仟佰拾元角分厘毫"

 checkp=instr(thenumber,".")'判断是否含有小数位
 if checkp<>0 then
 thenumber
=replace(thenumber,".","")'去除小数位
 end if

 length
=len(thenumber) '取得数据长度
 redim one(length-1)'重新定义数组大小
 redim onestr(length-1)'重新定义数组大小

for i=0 to length-1 

   one(i)
=mid(thenumber,i+1,1'循环取得每一位的数字
   one(i)=mid(string1,one(i)+1,1)'循环取得数字对应的大写

   
              
if checkp=0 then  
                                                  
'不含有小数的数据其数字对应的单位
                   onestr(i)=mid(string2,14-length+i,1
                
else
                                               
'含有小数的数据其数字对应的单位
                onestr(i)=mid(string2,15-length+i+len(thenumber)-checkp,1)
                
end if
  
   one(i)
=one(i)&onestr(i)'将数字与单位组合
next

    Money
=replace(join(one)," ",""'取得数组中所有的元素,并连接起来
    Money=replace(Money,"零元",""
    Money
=replace(Money,"零万",""
 Money
=replace(Money,"零亿","亿")
 Money
=replace(Money,"零仟","")
    Money
=replace(Money,"零佰",""
    Money
=replace(Money,"零拾","")

 
do while not instr(Money,"零零")=0 
 Money
=replace(Money,"零零","")
 
loop

response.
write Money  '显示结果
end  function
%
>