Syntax
Public Function ArrayCompare(ByRef array1 As Variant, ByRef array2 As Variant) As Integer
Description
This function is used to compare between the element of two given arrays of the same type.
Parameters
Key | Description |
array1 | First array to be compared. Value of type isVariant |
array2 | Second array to be compared. Value of type is Variant |
Return value
Returns0 if comparing arrays was equal. Else returns -1.
Sample
Public Sub main() Dim i() Dim array2 (2288) Dim compare CopyHigh 0, 10, 20, i ArrayCopy array2 , i Compare = ArrayCompare (i, array2) AlertMessage (compare) End Sub
See Also