I'd also recommend a divide and conquer (sp?) aproach - if you want to check if it's even in the table, check say first and last to see if lesser or greater then anything in the table, then if it is likely to be in the table, then start in the center, compare and go higher or lower depending on the value you are looking for.
Obviously like what memblers said, if you run into a value that is lower then your target value, then the next value is larger, it just isn't in the table and you can quit the search and return an entry not found.
_________________ -Tony
KG4WFX
|