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

TNativeUIntHelper.Bits

Read or write a bit.

Declaration

Source position: syshelph.inc line 1560

public property TNativeUIntHelper.Bits[aIndex: TNativeUIntBitIndex] : Boolean
  read GetBit
  write PutBit;

Description

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

MyNativeUInt.Clear;// MyNativeUInt equals 0
MyNativeUInt.Bits[0] := true;  // MyNativeUInt equals 1
MyNativeUInt.Bits[2] := true;  // MyNativeUInt equals 5
WriteLn(MyNativeUInt.Bits[2]); // TRUE

See also

TNativeUIntHelper.SetBit

  

Set bit to 1.

TNativeUIntHelper.ClearBit

  

Set bit to 0.

TNativeUIntHelper.ToggleBit

  

Invert bit.

TNativeUIntHelper.TestBit

  

Check bit.

TNativeUIntHelper.HighestSetBitPos

  

Return the position of the leftmost bit set.

TNativeUIntHelper.LowestSetBitPos

  

Return the position of the rightmost bit set.

TNativeUIntHelper.SetBitsCount

  

Count number of bits set.

TNativeUIntHelper.Nibbles

  

Read or write a nibble.

TNativeUIntHelper.Bytes

  

Read or write a byte.

TNativeUIntHelper.Words

  

Read or write a word.

TNativeUIntHelper.DWords


Documentation generated on: Dec 22 2024