|hey! I'm programming a Binary Search in VB6. Simple enough, however, the data I'm searching has some repetition. For example, SID001, SID001, SID002, SID003 (Representing a Student ID in a transaction file). |
The problem I'm having is that I need the program to continue to search when the required record is found, because there could be more. This, again, sounds pretty simple BUT when the code does the usual...
'IF the required record < mid_loc THEN
last_loc = mid_loc
mid_loc = (first_loc + last_loc) /2
It doesn't work BECAUSE the required record is of the same value as the mid_loc.
I hope some of this makes sense to someone, I'd very much appreciate help.
If you need to see the code I've got, I can post that :)