Don't click here unless you want to be banned.

LSL Wiki : Operators

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ec2-204-236-235-245.compute-1.amazonaws.com

Operators


In mathematics, an operator is a symbol that expresses the operation to be performed. In LSL, operators perform simple "common-sense" operations on values. The assignment operators are special in that the left hand side of the operation must be a variable.

Operator TypesDescriptionExamples
UnaryOperators that act on one value ++, --, ~, !
BinaryOperators that act on two values. +, -, *, /, %, +=, -=, *=, /=, %=, &&, ||, !, ==, !=, <=, <, >=, >
BooleanOperators that work with TRUE and FALSE values. &&, ||, !, ==, !=, <=, <, >=, >
BitwiseOperators that work with bitfields &, |, ~, ^, <<, >>
AssignmentSpecial operators that assign a value to a variable. =, +=, -=, *=, /=, %=

All operators in order of execution or precedence, from high to low:

Operation Description
() [] . Parentheses, Square Brackets and Dot Operator
! ~ ++ -- NOT, One's Complement, Increment, Decrement
* / % Multiply, Divide, Modulus (% is also Vector Cross)
+ - Addition and Subtraction
<< >> Left Shift, Right Shift
< <= > >= Less Than, Less Than Or Equal To, Greater Than, Greater Than or Equal To
== != Comparison Equal, Comparison Not Equal
& Bitwise AND
^ Bitwise XOR
| Bitwise OR
|| Comparison OR
&& Comparison AND
= += -= *= /= %= Assignment


Math

Operators | Unary | Binary | Bitwise | Boolean | Equality | Assignment
There are 6 comments on this page. [Display comments/form]