HasDups

Indicates if an array contains duplicate values. returns True if more than one array subscript value exactly matches another subscript value. returns False if the array contains no matching values

CodeFunctionName
What is this?

Public

Not Tested

Imported
<%
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
% >

byVal arrayinput

Views 1,643

Downloads 480

CodeID
DB ID