Maptitude GISDK Help

ShiftLeft()

Summary

Does a left arithmetic shift of the bits in an integer.

 

Syntax

int = ShiftLeft(integer int1, integer shift)

 

Argument

Contents

int1

An integer

shift

Number of bits to shift left, from 1 to 32; a negative value will shift right

 

Returns

An integer with an arithmetic shift of the bits the specified number of places to the left.

 

Notes

Examples

int = ShiftLeft(15, 1) // int = 30: in binary, 1111 becomes 11110

int = ShiftLeft(1073741824, 1) // int = -2147483648: leftmost numeric bit moved to sign bit

 

See Also

Function

Summary

BitwiseAnd()

Computes the bitwise AND of two integers

BitwiseNot()

Computes the bitwise NOT of an integer

BitwiseOr()

Computes the bitwise OR of two integers

BitwiseXor()

Computes the bitwise exclusive OR of an integer

ShiftRight()

Does a right arithmetic shift of the bits in an integer

 

 

©2025 Caliper Corporation www.caliper.com