Equinox Online Help - Language Reference - A to Z

Home

RotateLeft

Applies to
SyntaxRotateLeft(Item[,Number Of Times])
ActionRotate Item left NumberOfTimes times. Item is ulong. Bits at the high order end of the number are lost, and zero bits are added at the low order end. Practically speaking Number of shifts can be in the range -31 to +31 and default to +1. Negative values cause right rotation in a similar way.
Scope
Notes

This command allows bit manipulation of 32 bit values. Additionally overflow checking in arithmatic using ulong numbers has been relaxed as overflow is a common technique for truncating high order bits. Note also that Equinox treats the AND and OR operators as binary operators while they are inside brackets.

CategoryMaths
See Also ShiftLeft
Example

This example prints 42

print RotateLeft(21)

This example prints 8000000A

print HexStr(RotateLeft(21,-1))

This example prints 80000003

print HexStr(RotateLeft(0xC0000001))