Currently I'm using a "for" loop to examine each element of an array comparing for "equal or less than" of the element to the argument value. This seams like a cumbersome way to accomplish this task so I've been searching for alternative ways to do this without success.
Therefore, given a single dimension array with values that are in ascending sequence, can anyone suggest a better method to locate the element index number that is eiher equal to or less than but closest to the value in the argument?
I'll be very interested to see what everyone can offer!
Thanks all.
Therefore, given a single dimension array with values that are in ascending sequence, can anyone suggest a better method to locate the element index number that is eiher equal to or less than but closest to the value in the argument?
I'll be very interested to see what everyone can offer!
Thanks all.