Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>_lrotr() rotate a long value to the right</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _lrotr()                Rotate a Long Value to the Right

 #include   <stdlib.h>

 unsigned long _lrotr(value,count);
 unsigned long value;
 int           count;

    _lrotr() rotates an unsigned 'value' to the right by 'count' bits.

       Returns:     The rotated value.

   -------------------------------- Example ---------------------------------

    The following statements rotate 'val' by 'count' bits.

           #include <stdlib.h>

           main()
           {
               unsigned long val = 0xAAAA;
               int count = 1;

               printf("rotate %08lX %d bit(s) = %08lX \n",
                       val,count,_lrotr(val,count));
           }


See Also: _lrotl() _rotl() _rotr()

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