Carbon


BitTst

Header: ToolUtils.h Carbon status: Supported

Determines whether a given bit is set.

Boolean BitTst (
    const void *bytePtr, 
    SInt32 bitNum
);
bytePtr

A pointer to a byte in memory.

bitNum

The bit to be tested, specified as a positive offset from the high-order bit of the byte pointed to by the bytePtr parameter. The bit being tested need not be in the byte pointed to by bytePtr.

function result

TRUE if the specified bit is set (that is, has a value of 1) and FALSE if the bit is cleared (that is, has a value of 0).

SPECIAL CONSIDERATIONS

The bit numbering scheme used by the BitTst function is the opposite of the MC680x0 numbering. To convert an MC680x0 bit number to the format required by the BitTst function, subtract the MC680x0 bit number from the highest bit number.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)