Carbon


BitShift

Header: ToolUtils.h Carbon status: Supported

Shifts bits in a long word.

SInt32 BitShift (
    SInt32 value, 
    SInt16 count
);
Parameter descriptions
value

A long word.

count

The number of bits to shift. If this number is positive, BitShift shifts this many positions to the left; if this number is negative, BitShift shifts this many positions to the right. The value in this parameter is converted to the result of MOD 32.

function result

A long word that is the result of shifting the bits in the long word passed in as an argument. The shift’s direction and extent are determined by the count parameter. Zeroes are shifted into empty positions regardless of the direction of the shift.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)