大家看一下这个小函数的功能!!¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥

xlx001 2006-03-19 03:00:40
请高手给解释一个这个函数,万分感谢!
function cuted(types,num)
dim ctypes,cnum,ci,tt,tc,cc,cmod
cmod=3
ctypes=types
cnum=cint(num)
cuted=""
tc=0
cc=0
for ci=1 to len(ctypes)
if cnum<0 then
cuted=cuted&"..."
exit for
end if
tt=mid(ctypes,ci,1)
if int(asc(tt))>=0 then
cuted=cuted&tt
tc=tc+1
cc=cc+1
if tc=2 then tc=0
cnum=cnum-1
if cc>cmod then cnum=cnum-1
cc=0
else
cnum=cnum-1
if cnum<=0 then
cuted=cuted&"..."
exit for
end if
cuted=cuted&tt
end if
next
end function
-------------------------------------
出自乔客1.2/include/jk_class.asp
...全文
57 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
xlx001 2006-03-19
  • 打赏
  • 举报
回复
多谢前辈指点!今天收获不少!
KimSoft 2006-03-19
  • 打赏
  • 举报
回复
MsgBox cuted ("运行一下不就知道了", 3) '==>运行...
wtogether 2006-03-19
  • 打赏
  • 举报
回复
function cuted(types,num)
在num字节长度(注意,不是字符长度,一个英文一个字节,一个汉字两个字节)后右补三个省略号:...
hexiaofei 2006-03-19
  • 打赏
  • 举报
回复
看不懂
caixinke 2006-03-19
  • 打赏
  • 举报
回复
说说是什么地方用的或者功能是什么,其实不难,主要不知道想做什么
xlx001 2006-03-19
  • 打赏
  • 举报
回复
我研究了半天,越看越晕!

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧