本页主题: [请教]VBS的数组函数 打印 | 加为IE收藏 | 复制链接 | 收藏主题 | 上一主题 | 下一主题

我是学生
今宵没的睡
级别: 江湖大侠


精华: 3
发帖: 762
威望: 571 点
财富: 40 K币
贡献值: 0 点
注册时间:2005-11-25
最后登录:2008-11-12

 [请教]VBS的数组函数

请问VBS里面有没有从数组里面删除指定元素的函数呢?
这个世界上只有两件事是最公平的:
1.每个人每天都只有24小时;
2.每个人都必须面对死亡.
-------------------------------------------------------------
本人长期受理动态ASP网页制作与修改,留言簿、论坛制作等业务。
我的邮箱 我的主页
顶端 Posted: 2007-05-02 22:52 | [楼 主]
勇敢的风
级别: 勇者侠士


精华: 0
发帖: 111
威望: 131 点
财富: 967 K币
贡献值: 0 点
注册时间:2004-06-16
最后登录:2008-08-29

 

没有
.net有
顶端 Posted: 2007-05-03 09:33 | 1 楼
海浪
没钱了-_-
级别: 总版主


精华: 7
发帖: 16051
威望: 27638 点
财富: 14196 K币
贡献值: 4 点
注册时间:2003-03-21
最后登录:2008-11-24

 

可以自己写一个嘛
顶端 Posted: 2007-05-03 17:23 | 2 楼
我是学生
今宵没的睡
级别: 江湖大侠


精华: 3
发帖: 762
威望: 571 点
财富: 40 K币
贡献值: 0 点
注册时间:2005-11-25
最后登录:2008-11-12

 

Copy code
<%
Class C_UserList
    Function Add(User)
        Dim temp,i
        If IsArray(Application("UserList")) Then
            temp = Application("UserList")
            For i = LBound(temp) to UBound(temp) step 1
                If temp(i) = User Then Exit Function
            Next
            ReDim Preserve temp(UBound(temp) + 1)
            temp(UBound(temp)) = (User)
        Else
            ReDim Preserve temp(1)
            temp(1) = User
        End if
        Application("UserList") = temp
    End Function
   
    Function Del(User)
        Dim temp,i,j
        If IsArray(Application("UserList")) Then
            temp = Application("UserList")
            For i = LBound(temp) to UBound(temp) step 1
                If temp(i) = User Then
                    For j = i to UBound(temp) - 1 step 1
                        temp(j) = temp(j + 1)
                    Next
                    ReDim Preserve temp(UBound(temp) - 1)
                    Exit For
                End if
            Next

        Else
            temp = ""
        End if
        Application("UserList") = temp
    End Function
   
    Function Show(iCount)
        Dim temp,i,str
        temp = Application("UserList")
        If IsArray(temp) Then
            if IsNumeric(iCount) And iCount >= LBound(temp) And iCount <= UBound(temp) Then
                str = temp(iCount)
            Else
                For i = LBound(temp) to UBound(temp) step 1
                    If i <> LBound(temp) Then str = str & "<br>"
                    str = str & temp(i)
                Next
            End if
        Else
            str = temp
        End if
        Show = str
    End Function
End Class
%>
这个世界上只有两件事是最公平的:
1.每个人每天都只有24小时;
2.每个人都必须面对死亡.
-------------------------------------------------------------
本人长期受理动态ASP网页制作与修改,留言簿、论坛制作等业务。
我的邮箱 我的主页
顶端 Posted: 2007-05-03 20:50 | 3 楼
帖子浏览记录 版块浏览记录
IECN社区 » ASP/.Net/MSSQL

Time now is:01-09 02:36, Gzip disabled 京ICP备06069722号
Powered by PHPWind v6.3.2 Certificate Code © 2003-08 PHPWind.com Corporation