Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

REVERSE ARRAY USING LIST

Function ReverseArray(arr As Variant) As Variant
    Dim val As Variant

    With CreateObject("System.Collections.ArrayList") '<-- create a "temporary" array list with late binding 
        For Each val In arr '<--| fill arraylist
            .Add val
        Next val
        .Reverse '<--| reverse it
        ReverseArray = .Toarray '<--| write it into an array
    End With
End Function
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #REVERSE #ARRAY #USING #LIST
ADD COMMENT
Topic
Name
3+7 =