rotate an unsigned long integer to the left
#include <stdlib.h> unsigned long _lrotl( unsigned long value, unsigned int shift );
The _lrotl() function rotates the unsigned long integer, determined by value, to the left by the number of bits specified in shift.
the rotated value
#include <stdio.h> #include <stdlib.h> unsigned long mask = 0x12345678; void main() { mask = _lrotl( mask, 4 ); printf( "%08lX\n", mask ); }
produces the output:
23456781
WATCOM
All (except DOS/PM)