Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdlib.h>
    unsigned int _rotl( unsigned int value,
                        unsigned int shift );

Description:
    The _rotl function rotates the unsigned integer, determined by value, to
    the left by the number of bits specified in shift.  If you port an
    application using _rotl between a 16-bit and a 32-bit environment, you
    will get different results because of the difference in the size of
    integers.

Returns:
    The rotated value is returned.

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

    unsigned int mask = 0x0F00;

    void main()
      {
        mask = _rotl( mask, 4 );
        printf( "%04X\n", mask );
      }

    produces the following:

    F000

Classification:
    WATCOM

Systems:
    All, Netware

See Also:
    _lrotl, _lrotr, _rotr

See Also: _lrotl _lrotr

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