Sign in Join
FPDoc Onlineexperiment

TNativeIntHelper.Bits property

Member of TNativeIntHelperpublicIn unit sysutils

Read or write a bit.

Declaration

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

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