SHL/SHR/ROL/ROR

BlitzMax Forums/BlitzMax Programming/SHL/SHR/ROL/ROR

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Function ROR:Int(Value:Int=0,Bits:Int=0)
      Return (Value Shr Bits) | ((Value Shl (32-Bits)) 'Rotate integer to the right
End Function

Function ROL:Int(Value:Int=0,Bits:Int=0)
      Return (Value Shl Bits) | ((Value Shr (32-Bits)) 'Rotate integer to the left
End Function