Sign in Join
FPDoc Onlineexperiment

TBits.FindFirstBit function

Member of TBitspublicIn unit Classes

Find first bit with a particular value.

Declaration

pascal
function FindFirstBit(State: Boolean): SizeInt

Description

FindFirstBit searches for the first bit with value State. It returns the position of this bit, or -1 if no such bit was found.

The search starts at position 0 in the array. If the first search returned a positive result, the found position is saved, and the FindNextBit and FindPrevBit will use this position to resume the search. To start a search from a certain position, the start position can be set with the SetIndex instead.

Errors

None.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.