You are here: Symbol Reference > MtxExprInt Namespace > Classes > MatrixInt Record > public > Find Method > MatrixInt.Find Method (integer)
MtxVec VCL
ContentsIndex
PreviousUpNext
MatrixInt.Find Method (integer)

Finds a match for X in object values.

Pascal
function Find(const X: integer): integer; overload;

the index of last matched element. If no matching elements are found, the result is -1.

Compare real value X with all calling object elements.

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;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!