Summary
Finds a match for X in object values.
Class
TMtxVec
Declaration
Function Find(X: TCplx): integer;
Description
Compare complex value X with all calling object elements and return the index of last matched element. If no matching elements are found, the result is -1. An exception is raised if calling object
Complex property is false.
Declaration
Function Find(X: TSample): integer;
Description
Compare real value X with all calling object elements and return the index of last matched element. If no matching elements are found, the result is -1.
Note: This method also supports the NAN and INF search.
Example 1
var a: TVec;
ind: Integer;
begin
a := TVec.Create;
try
a.SetIt(False,[2,5,1,6]);
ind := a.Find(1.0); // returns 2 (the arrays are zero based)
finally
a.Free;
end;
end;
| Copyright 2008 Dew Research |
http://www.dewresearch.com