Compares two clsD3DynamicArray objects, and if equal, returns True.
bValue = object.brEqual( oDynArray)
Parameter | Description |
---|---|
bValue | The return value is a Boolean data type that is True if equal. |
object | An object variable that represents a clsD3DynamicArray object to be compared. |
oDynArray | An object variable that represents a clsD3DynamicArray object to be compared. |
To make the comparison, the brEqual method converts both clsD3DynamicArray objects to strings. If both strings consist of numeric information, then a numeric comparison is made, otherwise, a string comparison is made.
Sub Main() Dim oEnv As New clsD3Environment Dim oArray1 As New clsD3DynamicArray Dim oArray2 As New clsD3DynamicArray Dim oArray3 As New clsD3DynamicArray ' Constructing a dynamic array - method 1. ' Inserting attributes and values into a dynamic array. oArray1.brInsertStr "Hammersmith", 1 oArray1.brInsertStr "Joe", 2, 1 oArray1.brInsertStr "Sally", 2, 2 ' Constructing a dynamic array - method 2. ' Using -1, inserts the string as the last ' element in that position. oArray2.brInsertStr "Hammersmith", 1 oArray2.brInsertStr "Joe", 2, -1 oArray2.brInsertStr "Sally", 2, -1 ' Constructing a dynamic array - method 3. oArray3.brCString = "Hammersmith" & D3AMChr & "Joe" & D3VMChr & "Sally" Debug.Print oArray1.brCString Debug.Print oArray2.brCString Debug.Print oArray3.brCString If oArray1.brEqual(oArray2) Then Debug.Print "The dynamic arrays are equal" End If If oArray1.brEqual(oArray3) Then Debug.Print "The dynamic arrays are equal" End If Set oArray1 = Nothing Set oArray2 = Nothing Set oArray3 = Nothing Set oEnv = Nothing End Sub