Borland C++ reference

_rotr

raw OCR

Bit-rotates an unsigned integer value to the right.

Defined in header <stdlib.h>

Syntax

#include <stdHb.h>
unsigned  _rotr(unsigned value, int count);

Portability

DOSUNIXWindowsANSI CC++ only
■■

Remarks

_rotr rotates the given value to the right count bits. The value rotated is an unsigned integer.

Return value

_rotr returns the value of value right-rotated count bits.

See also

Example

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

int main (void)

   unsigned value, result;
   value = 32767;
   result = _rotr (value, 1);
   printfC'The value %u rotated  right one bit is: %u\n", value, result);
   return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.

Extraction notes

  • heading `rotr` read as `_rotr`
  • header `stdHb.h` read as `stdlib.h`