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

TNativeIntHelper.Bits

Read or write a bit.

Declaration

Source position: syshelph.inc line 1471

public property TNativeIntHelper.Bits[aIndex: TNativeIntBitIndex] : Boolean
  read GetBit
  write PutBit;

Description

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

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

See also

TNativeIntHelper.SetBit

  

Set bit to 1.

TNativeIntHelper.ClearBit

  

Set bit to 0.

TNativeIntHelper.ToggleBit

  

Invert bit.

TNativeIntHelper.TestBit

  

Check bit.

TNativeIntHelper.HighestSetBitPos

  

Return the position of the leftmost bit set.

TNativeIntHelper.LowestSetBitPos

  

Return the position of the rightmost bit set.

TNativeIntHelper.SetBitsCount

  

Count number of bits set.

TNativeIntHelper.Nibbles

  

Read or write a nibble.

TNativeIntHelper.Bytes

  

Read or write a byte.

TNativeIntHelper.Words

  

Read or write a word.

TNativeIntHelper.DWords


Documentation generated on: Nov 22 2024