Displaying Source Code(s)
|
|
HasDups Function (ndicates if an array contains duplicate
values)
--------------------------------------------------------------------------------
Description : The HasDups function indicates if an array
contains duplicate values. HasDups returns True if more than one
array subscript value exactly matches another subscript value.
HasDups returns False if the array contains no matching values.
<%
Private Function HasDups(ByVal arrayinput)
Dim wkarray, j, i, l
wkarray = arrayinput
For j = 0 To UBound( wkarray )
l = 0
For i = 0 To UBound( wkarray )
If wkarray(i) = wkarray(j) Then l = l + 1
If l > 1 Then
HasDups = True
Exit Function
End If
Next
Next
HasDups = False
End Function
%> |
|
|