Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - _lrotl, _lrotr http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   _lrotl, _lrotr

   Usage
   #include <stdlib.h>
   unsigned long _lrotl(unsigned long val, int shift);
   unsigned long _lrotr(unsigned long val, int shift);

   Description
   The  functions  _lrotl and _lrotr carry out a binary rotation  of  the
   supplied unsigned long, value, by shift bits.

   Example
   #include <stdio.h>
   #include <stdlib.h>

   main()
   {
   unsigned long value = 0x01234567;

        printf("_lrotl(value,4) = 0x%8.81x/n",_lrotl(val,4));
        printf("_lrotr(value,12) = 0x%8.81x/n",_lrotr(val,12));
   }

   Return Value
   Both of these functions return the rotated value as an unsigned  long.
   There is no error return.


See Also: _rotl _rotr

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson