티스토리 뷰

'===================================================================
' 배열 내용중 offset ~ length 까지를 뽑아 배열로 반환
'------------------------------------------------------------------
' array_slice(arr,0,3)
'===================================================================
Function array_slice(arr, offset, length)
    Dim x : x = 0
    Dim newArray()
    For i = offset to length
        ReDim Preserve newArray(x)
        newArray(x) = arr(i)
        x = x + 1
    Next
    array_slice = newArray
End Function
댓글