System.SyncObjs.TInterlocked.BitTestAndClear

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function BitTestAndClear(var Target: Integer; BitOffset: TBitOffset): Boolean; static;

C++

static bool __fastcall BitTestAndClear(int &Target, TBitOffset BitOffset);

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.

See Also