System.SyncObjs.TInterlocked.BitTestAndClear
Delphi
class function BitTestAndClear(var Target: Integer; BitOffset: TBitOffset): Boolean; overload; static;
class function BitTestAndClear(var Target: Cardinal; BitOffset: TBitOffset): Boolean; overload; static;
class function BitTestAndClear(var Target: Int64; BitOffset: TBitOffset64): Boolean; overload; static;
class function BitTestAndClear(var Target: UInt64; BitOffset: TBitOffset64): Boolean; overload; static;
C++
static bool __fastcall BitTestAndClear(int &Target, TBitOffset BitOffset)/* overload */;
static bool __fastcall BitTestAndClear(unsigned &Target, TBitOffset BitOffset)/* overload */;
static bool __fastcall BitTestAndClear(__int64 &Target, TBitOffset64 BitOffset)/* overload */;
static bool __fastcall BitTestAndClear(unsigned __int64 &Target, TBitOffset64 BitOffset)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SyncObjs.pas System.SyncObjs.hpp |
System.SyncObjs | TInterlocked |
Description
Tests whether a certain bit in a variable is set to 1 and sets its value to 0.
BitTestAndClear tests whether a certain bit in a variable is set to 1 and sets its value to 0. BitOffset specifies which bit of the Target parameter will be tested. The method returns True if the bit is 1, False otherwise. Additionally, the bit is set to 0 regardless of its value.