Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 3 - Mathematical and Logical Utilities / Mathematical and Logical Utilities Reference
Routines / Performing Logical Operations


BitShift

You can use the BitShift function to shift bits in a long word.

FUNCTION BitShift (value: LongInt; count: Integer): LongInt;
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.
DESCRIPTION
The BitShift function returns a long word that is the result of shifting the bits in the long word specified by the value parameter. 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.

SEE ALSO
For an illustration of the result of performing an operation using the BitShift function, see Figure 3-10 on page 3-17.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996