Sign in Join
FPDoc Onlineexperiment

TNativeUIntHelper.Bits property

Member of TNativeUIntHelperpublicIn unit sysutils

Read or write a bit.

Declaration

pascal
property 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

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