function Find(const X: Integer): Integer;
Finds a match for X in object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | Integer |
Returns: Int32 - the index of first matched element. If no matching elements are found, the result is -1.
Remarks:
Compare real value X with all calling object elements.
Examples
var a: TMtxInt;
ind: Integer;
begin
a := TMtxInt.Create;
try
a.SetIt(False,[2,5,1,6]);
ind := a.Find(1); // returns 2 (the arrays are zero based)
finally
a.Free;
end;
end;