国产探花免费观看_亚洲丰满少妇自慰呻吟_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
%>


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 石渠县| 四川省| 玉林市| 保德县| 永修县| 凉城县| 岱山县| 巩留县| 奉新县| 闽侯县| 安顺市| 大姚县| 务川| 开鲁县| 凉城县| 碌曲县| 宝鸡市| 靖远县| 南投县| 仁寿县| 锡林郭勒盟| 青龙| 安福县| 伊通| 洛扎县| 杨浦区| 旺苍县| 宜兰市| 通海县| 女性| 陵川县| 富锦市| 垦利县| 库伦旗| 彭州市| 宜兰县| 横山县| 芮城县| 建宁县| 洞头县| 庐江县|