Self-Operators bit wise
Implemented in Version | 2013.r3 |
---|
A „Self-Operation“ stand for themselves and aren't provided for the use within expressions. “Variable” in the description means variables in the working memory (SRAM). These were dimensioned as an array, element of a structure or property of a user-defined class.
and= (AND)
This combination operator performs a bitwise AND operation on the value of a variable with the result of the specified expression.
variable and= Expression
Example:
dim a as byte a and= 0x0f ' like a = a and 0x0f
or= (OR)
This combination operator performs a bitwise OR of the value of a single variable with the result of the specified expression.
variable or= Expression
Example:
dim a as byte a or= 0x0f ' like a = a or 0x0f
xor= (EXCLUSIVE-OR)
This combination operator performs a bitwise exclusive OR operation on the value of a single variable with the result of the specified expression.
variable xor= Expression
Example:
dim a as byte a xor= 0x0f ' like a = a xor 0x0f
>>= (SHIFT-RIGHT)
This combination operator performs a bitwise shift-right on the value of a variable.
variable >>= Expression
Example:
dim a as byte a >>= 4 ' like a = a >> 4
<<= (SHIFT-LEFT)
This combination operator performs a bitwise shift-left on the value of a variable.
variable <<= Expression
Example:
dim a as byte a <<= 4 ' like a = a << 4