MakeValidElemRange

Declaration: TVector.MakeValidElemRange (var LowElem, HighElem: integer);
The method MakeValidElemRange ensures that the vector indexes LowElem and HighElem are within the valid index range of the vector (i.e. they are greater or equal to 1 and less than or equal to NrOfElem). If any of the two variable parameters falls outside the valid range, it is adjusted to the nearest limit. Passing a zero value to both parameters returns the minimum and maximum range values (i.e. 1 and NrOfElem).