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

TInt64Helper.Bits

Read or write a bit

Declaration

Source position: syshelph.inc line 920

public property TInt64Helper.Bits[aIndex: TInt64BitIndex] : Boolean
  read GetBit
  write PutBit;

Description

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

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

See also

TInt64Helper.SetBit

  

Set bit to 1

TInt64Helper.ClearBit

  

Set bit to 0

TInt64Helper.ToggleBit

  

Invert bit

TInt64Helper.TestBit

  

Check bit

TInt64Helper.HighestSetBitPos

  

Return the position of the leftmost bit set

TInt64Helper.LowestSetBitPos

  

Return the position of the rightmost bit set

TInt64Helper.SetBitsCount

  

Count number of bits set

TInt64Helper.Nibbles

  

Read or write a nibble

TInt64Helper.Bytes

  

Read or write a byte

TInt64Helper.Words

  

Read or write a word

TInt64Helper.DWords

  

Read or write a dword


Documentation generated on: Sep 29 2022