Public Function CompareArrays(ExpArray, ActArray, Test_step)
iResult=True
If (UBound(ExpArray)<>UBound(ActArray)) Then
call Logger(Test_step,"Array comparision failed as the Sizes of Arrays are not equal","Fail")
Else
array_size=UBound(ExpArray)
End If
For i=0 to array_size
If (LCase(Trim(ExpArray(i)))<>LCase(Trim(ActArray(i))))Then
iResult=False
Else
iResult=True
End If
Next
End Function
Public Function CompareinArray(ExpArray, ActArray, Test_step)
array_size=UBound(ExpArray)
For i=0 to array_size
iResult=False
For j=0 to UBound(ActArray)
If (LCase(Trim(ExpArray(i)))=LCase(Trim(ActArray(j))))Then
iResult=True
Exit For
End If
Next
If NOT iResult Then
iResult=False
End If
Next
End Function
Public Function CompareValueinArray(StringVal, ExpArray, Test_step)
iResult=False
array_size=UBound(ExpArray)
For i=0 to array_size
If (LCase(Trim(ExpArray(i)))=LCase(Trim(StringVal)))Then
iResult=True
End If
Next
If iResult Then
CompareValueinArray=True
Else
CompareValueinArray=False
End If
End Function
Public Function Join_Arrays(Array1, Array2, Joined_Array)
ReDim Joined_Array(Ubound(Array1)+Ubound(Array2)+1)
For ind=0 to Ubound(Array1)
Joined_Array(ind)=Array1(ind)
Next
For ind=0 to Ubound(Array2)
Joined_Array(Ubound(Array1)+1+ind)=Array2(ind)
Next
End Function
Public Function ArraySort_desc(arrShort)
For i = UBound(arrShort) - 1 To 0 Step -1
For j= 0 to i
If arrShort(j) < arrShort(j+1) then
temp=arrShort(j+1)
arrShort(j+1)=arrShort(j)
arrShort(j)=temp
end if
next
Next
End Function
Public Function ArraySort_asc(arrShort)
For i = UBound(arrShort) - 1 To 0 Step -1
for j= 0 to i
if arrShort(j) > arrShort(j+1) then
temp=arrShort(j+1)
arrShort(j+1)=arrShort(j)
arrShort(j)=temp
end if
next
Next
End Function