You are here: Symbol Reference > AbstractMtxVec Namespace > Classes > TMtxVec Class > public > Find Method > TMtxVec.Find Method (double)
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxVec.Find Method (double)

Finds a match for X in object values.

Pascal
function Find(const x: double): 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.

This method also supports the NAN and INF search.

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