You are here: Symbol Reference > MtxExpr Namespace > Classes > Vector Record > public > Find Method > Vector.Find Method (double)
MtxVec VCL
ContentsIndex
PreviousUpNext
Vector.Find Method (double)

Finds a match for X in object values.

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

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.

This method also supports the NAN and INF search.

var a: Vector; ind: Integer; begin a.SetIt(False,[2,5,1,6]); ind := a.Find(1.0); // returns 2 (the arrays are zero based) end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!