The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



FindExact


Unit:SDL_vector
Class: TIntVector
Declaration: [1] function FindExact (LowElem, HighElem, Value: integer): integer; { class TIntVector }
[2] function FindExact (LowElem, HighElem, Value: double): integer; { class TVector }

The method Find searches and compares all elements of the vector to the value specified by the parameter Value and returns the index of the found element. The search range is specified by the parameters LowElem and HighElem. If an exact match cannot be found a zero value is returned.

As for version [2]: please note that FindExact may not work correctly for values which are slightly off the intended value due to rounding effects at the resolution limit of floating point numbers.

Hint: Setting both parameters LowElem and HighElem to zero values forces a search through all vector elements.



Last Update: 2023-Feb-06