仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2334|回复: 20
打印 上一主题 下一主题

[学习教程] ASP编程:阿拉伯数字转中文数字函数

[复制链接]
因胸联盟 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-2-3 23:41:06 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
只要你想学,就没什么优缺点,上面那位大哥已经把网上的评论说了,但我认为想学哪个都一样,不然它就不可能在当今时代数字艺术方面存活到今天函数|中文   将"54883661"转为"五千四百八十八万三千六百六十一"的函数

<%
'################################
'函数名:阿拉伯数字转中文数字函数
'作者:网海求生者
'QQ:54883661 date:2002.3.7
'################################
function chnumstr(num)
strlen=len(num)
for i=1 to strlen
select case mid(num,i,1)
case 1:chnum="一":case 2:chnum="二":case 3:chnum="三":case 4:chnum="四":case 5:chnum="五"
case 6:chnum="六":case 7:chnum="七":case 8:chnum="八":case 9:chnum="九":case 0:chnum="零"
end select
chnumstr=chnumstr&chnum
if i=strlen-1 and mid(num,i,1)<>0 then chnumstr=chnumstr&"十"
if i=strlen-2 and mid(num,i,1)<>0 then chnumstr=chnumstr&"百"
if i=strlen-3 and mid(num,i,1)<>0 then chnumstr=chnumstr&"千"
if i=strlen-4 and mid(num,i,1)<>0 then chnumstr=chnumstr&"万"
if i=strlen-5 and mid(num,i,1)<>0 then chnumstr=chnumstr&"十"
if i=strlen-6 and mid(num,i,1)<>0 then chnumstr=chnumstr&"百"
if i=strlen-7 and mid(num,i,1)<>0 then chnumstr=chnumstr&"千"
if i=strlen-8 and mid(num,i,1)<>0 then chnumstr=chnumstr&"万"
next
end function
%>

<%
response.write chnumstr(54883661) '呵,偶的QQ号54883661
%>

</p>  asp对于服务器的要求较高,一般的服务器如果访问量一大就垮了,不得不重启。
因胸联盟 该用户已被删除
沙发
 楼主| 发表于 2015-3-5 22:24:37 | 显示全部楼层
ASP.Net摆脱了以前ASP使用脚本语言来编程的缺点,理论上可以使用任何编程语言包括C++,VB,JS等等,当然,最合适的编程语言还是MS为.NetFrmaework专门推出的C(读csharp),它可以看作是VC和Java的混合体吧。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-5-18 16:41

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表