Sign in Join
FPDoc Onlineexperiment

TByteHelper.LowestSetBitPos function

Member of TByteHelperpublicIn unit sysutils

Return the position of the rightmost bit set.

Declaration

pascal
function LowestSetBitPos: Int8

Description

LowestSetBitPos scans the byte, starting at position 0 (rightmost position) and returns the index of the first set bit. The position is measured from the 0-th, rightmost bit. When there are no bits set, the result is -1.

See also

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