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


Public

Not Tested

Not My Work
<%
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 278 Downloads 59

Classic ASP Sessions
ANmarAmdeen
644
Attachments
Revisions

v1.0