vbscript - VBScipt Array Comparison -
i have problem vbscript.
i trying loop through array compare values match.
i.e have tring array 1 below. want compare each of values match using vbscript.
tmp(0) = "12345" tmp(1) = "12345" tmp(2) = "12345" tmp(3) = "12345" tmp(4) = "12345" if loop on array have twice in order compare vals. how can handle first values. if first value wrong never picked both arrays identical. not know how around problem. please advise.
for x=0 ubound(tmp) each val in tmp if ( tmp(x) <> val) print (mismatch) end if next next
not sure if understand question correctly. want check if values of array equal? if so, should do:
elementsequal = true = 1 ubound(tmp) if tmp(i) <> tmp(0) elementsequal = false exit end if next you don't need compare each element each other element check if equal. if not elements equal, 1 of them inequal first element, need single loop.
Comments
Post a Comment