Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - longrotateleft() rotate left the bits in a ulong by the given number http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 longrotateleft()    Rotate left the bits in a ulong by the given number
------------------------------------------------------------------------------
 Declaration
   bit.hdr

 Syntax
   func ulong longrotateleft extern
   param value ulong uNumber, ;
         value uint  uBits

 Arguments
   uNumber is a numeric expression.
   uBits is the number of bits to rotate.

 Return
   The result of the rotate operation.

 Description
   longrotateleft() rotates the 32 bits in uNumber to the left by the
   number specified by uBits. Bits "shifted out" are inserted at the right-
   most position.

   When uNumber has the following binary representation

   1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1

   longrotateleft( uNumber, 1 ) returns a result having the following binary
   representation:

   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1

   The leading "1" was moved to the rightmost position, and the other bits
   were shifted to the left.

 Example
   #define EXAMPLE_MATH
   #include example.hdr

   proc Test_longrotateleft
   vardef
      ulong nNum
   enddef
   nNum := 10000000000000000000000000000111B
   ? nNum
   ? longrotateleft( nNum, 1 )
   endproc

   proc main
   Test_longrotateleft()
   endproc

See Also: longrotateright() rotateleft()

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