Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

TQWordHelper.Bits

Read or write a bit.

Declaration

Source position: syshelph.inc line 1325

public property TQWordHelper.Bits[aIndex: TQwordBitIndex] : Boolean
  read GetBit
  write PutBit;

Description

Bits property reads or writes boolean value to a bit number determined by argument aIndex.

MyQWord.Clear;// %0000000000000000000000000000000000000000000000000000000000000000 MyQWord equals 0
  MyQWord.Bits[0] := true;  // %0000000000000000000000000000000000000000000000000000000000000001 MyQWord equals 1
  MyQWord.Bits[2] := true;  // %0000000000000000000000000000000000000000000000000000000000000101 MyQWord equals 5
  WriteLn(MyQWord.Bits[2]); // TRUE

See also

TQWordHelper.SetBit

  

Set bit to 1.

TQWordHelper.ClearBit

  

Set bit to 0.

TQWordHelper.ToggleBit

  

Invert bit.

TQWordHelper.TestBit

  

Check bit.

TQWordHelper.HighestSetBitPos

  

Return the position of the leftmost bit set.

TQWordHelper.LowestSetBitPos

  

Return the position of the rightmost bit set.

TQWordHelper.SetBitsCount

  

Count number of bits set.

TQWordHelper.Nibbles

  

Read or write a nibble.

TQWordHelper.Bytes

  

Read or write a byte.

TQWordHelper.Words

  

Read or write a word.

TQWordHelper.DWords

  

Read or write a dword.


Documentation generated on: Dec 23 2024