by Brayla Sana | May 26, 2017 | LSL, Operators, OSSL, Wiki
NOT is unlike the other bitwise operators in that it does not perform an operation on two bitfields. It only performs an operation on one. What it does is reverse the bitfield; if a bit was previously 0, it is changed to 1, and vice versa. Truth Table: NOT...
by Brayla Sana | Jan 22, 2017 | LSL, Operators, OSSL, Wiki
Unary operators take one argument. In LSL these arguments are normally integers. Operator Type Meaning Return Value Effect variable++ Arithmetic post-increment variable variable is set to variable + 1 ++variable Arithmetic pre-increment variable + 1 variable is set to...
by Brayla Sana | Jan 22, 2017 | LSL, Operators, OSSL, Wiki
Boolean operators behave like other operators such as +, -, *, / etc except the inputs and output can only take on two values. These values can be represented as TRUE and FALSE or 1 and 0 although any non zero value will generally be treated as TRUE. Unlike most...
by Brayla Sana | Jan 16, 2017 | LSL, Operators, OSSL, Wiki
OR places a 1 in the bitfield if either bitfields passed to it have a 1 in that position. If neither has a 1, it places a 0 in that position. Truth Table: OR 1 0 1 1 1 0 1 0 Usage: // A bitfield whose binary representation is: 00000000000000000000000000001010 integer...
by Brayla Sana | Jan 16, 2017 | Boolean, LSL, Operators, OSSL, Wiki
The AND operation compares each bit in two integers; if both bits are set to “1”, then the final result will be “1”, otherwise it will be “0”. This is done “per-bit”, or “bitwise”. Truth Table: AND 1 0 1 1 0...