the unsignedShr system function can be used to do an unsigned shr (Oxygene) or >> (C#, Swift and Java) operation in Java projects. Internally it compiles down to the JVM ISHR/LSHR opcodes.


method unsignedShr(value: Integer; aShift: Integer): Integer;
int unsignedShr(int value, int shift)
func unsignedShr(_ value: Int, _ shift: Int) -> Int
int unsignedShr(int value, int shift)

The difference between unsignedShr() and the regular shr/>> operator is how the "sign" bit is treated; with unsignedShr(), the sign bit is also shifted, while with the regular shr/>> operator it is not.

Java Only

  • unsignedShr() is supported on the Java platform only.

See Also