国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

ASP將兩個數組合并為一個數組函數 array_merge()

2019-11-17 04:14:18
字體:
來源:轉載
供稿:網友

<%
    ' Copyright (c) 2009, reusablecode.blogspot.com; some rights reserved.
    '
    ' This work is licensed under the Creative Commons Attribution License. To view
    ' a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or
    ' send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
    ' 94305, USA.

    ' Merge two arrays into one.
    function array_merge(byVal firstArray, byVal secondArray)
        dim totalSize
        dim i
        dim combinedArray
       
        ' Ensure that we're dealing with arrays.
        if not isArray(firstArray) then
            firstArray = Array(firstArray)
        end if
       
        if not isArray(secondArray) then
            secondArray = Array(secondArray)
        end if
       
        ' Set up the new array.
        totalSize = uBound(firstArray) + uBound(secondArray) + 1
        combinedArray = firstArray
        redim PReserve combinedArray(totalSize)
       
        for i = 0 to uBound(secondArray)
            combinedArray(uBound(firstArray) + 1 + i) = secondArray(i)
        next
       
        array_merge = combinedArray
    end function
%>


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 河北省| 晋宁县| 宝兴县| 阳江市| 年辖:市辖区| 阜平县| 石景山区| 莱州市| 眉山市| 鸡泽县| 罗田县| 怀柔区| 光泽县| 阳春市| 库尔勒市| 聊城市| 康定县| 英吉沙县| 英吉沙县| 壤塘县| 嘉善县| 安泽县| 五寨县| 吴忠市| 辽中县| 通道| 聂荣县| 青州市| 汝城县| 广灵县| 沅陵县| 丰台区| 安溪县| 安国市| 满洲里市| 诏安县| 墨玉县| 永昌县| 保康县| 东海县| 图片|