SHL Operator

Does a left shift operation on a bit pattern.

Syntax

pattern SHL amount

Parts

pattern
An integer expression.
amount
An integer expression.

Instructions

If pattern is a signed data type – Int8, Int16, Int32, Int, Int64, or Int128 – an arithmetic left shift is performed. An arithmetic shift is ...

If pattern is an unsigned data type – UInt8, UInt16, UInt32, UInt, UInt64, or UInt128 – a logical left shift is performed. A logical shift is ...

Examples

pat = 42
R1 = pat SHL 0
R2 = pat SHL 1
R3 = pat SHL 8
R4 = pat SHL -1
After execution
variablevalue
R1?
R2?
R3?
R4?

See also