Difference between revisions of "Category:LSL Operators"
m |
Void Singer (talk | contribs) m (tweaked) |
||
Line 15: | Line 15: | ||
{{!}} , | {{!}} , | ||
{{!}}{{!}} Separator | {{!}}{{!}} Separator | ||
{{!}}{{!}} Left to Right{{Footnote|handle=1|Separators promote ALL operators to the left until the first unmatched, from | {{!}}{{!}} Left to Right{{Footnote|handle=1|Separators promote ALL operators to the left until the first unmatched, from its position, open-bracket or open-parenthesis. This precedence ONLY applies within the brackets/parenthesis containing it}} | ||
{{!}}- | {{!}}- | ||
{{!}} | {{!}} | ||
Line 44: | Line 44: | ||
Multiplication/Dot-Product Assignment | Multiplication/Dot-Product Assignment | ||
{{!}}{{!}} | {{!}}{{!}} | ||
Right to Left{{Footnote|handle=2|Assignment operators promote ALL operators to the right until the first un-bracketed/ | Right to Left{{Footnote|handle=2|Assignment operators promote ALL operators to the right, from its position, until the first un-bracketed/parenthesized separator, unmatched close bracket or close parenthesis, or semicolon. This precedence ONLY applies within the brackets/parenthesis containing it}} | ||
{{!}}- | {{!}}- | ||
{{!}} | {{!}} | ||
Line 51: | Line 51: | ||
{{!}}{{!}} | {{!}}{{!}} | ||
Parenthesis<br> | Parenthesis<br> | ||
List Constructor | [[List|List Constructor]] | ||
{{!}}{{!}} Inner to Outer | {{!}}{{!}} Inner to Outer | ||
{{!}}- | {{!}}- | ||
Line 60: | Line 60: | ||
- | - | ||
{{!}}{{!}} | {{!}}{{!}} | ||
Typecast<br> | [[Typecast]]<br> | ||
Bitwise NOT<br> | Bitwise NOT<br> | ||
Logical NOT<br> | Logical NOT<br> | ||
Line 69: | Line 69: | ||
/<br> | /<br> | ||
%<br> | %<br> | ||
<nowiki>*</nowiki> | <nowiki>*</nowiki> | ||
{{!}}{{!}} | {{!}}{{!}} | ||
Division<br> | Division<br> | ||
Modulus<br> | Modulus<br> | ||
Multiplication | Multiplication | ||
{{!}}{{!}} Left to Right | {{!}}{{!}} Left to Right | ||
{{!}}- | {{!}}- | ||
{{!}} | {{!}} | ||
-<br> | |||
+ | |||
{{!}}{{!}} | {{!}}{{!}} | ||
[[LSL_Addition|Addition/Concatenation]] | Subtraction<br> | ||
[[LSL_Addition|Addition/Concatenation]] | |||
{{!}}{{!}} Left to Right | {{!}}{{!}} Left to Right | ||
{{!}}- | {{!}}- |
Latest revision as of 17:06, 29 September 2010
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Page recreated to house the future revision of the LSL_Operators page into categorized Content. Please do not delete.
if you're looking for the current version, it may be found at LSL_Operators.
Operator Precedence (Order of Operations)
Operator | Description | Direction |
---|---|---|
, | Separator | Left to Right[1] |
++ |
Increment |
Right to Left |
= |
Direct Assignment |
Right to Left[2] |
() |
Parenthesis |
Inner to Outer |
(type) |
Typecast |
Right to Left |
/ |
Division |
Left to Right |
- |
Subtraction |
Left to Right |
<< |
Bitwise Shift Left |
Left to Right |
< |
Less Than |
Left to Right |
== |
Equivalent |
Left to Right |
& | Bitwise AND | Left to Right |
^ | Bitwise eXclusive OR | Left to Right |
| | Bitwise OR | Left to Right |
&& |
Logical AND |
Left to Right[3] |
Special Notes
- ^ Separators promote ALL operators to the left until the first unmatched, from its position, open-bracket or open-parenthesis. This precedence ONLY applies within the brackets/parenthesis containing it
- ^ Assignment operators promote ALL operators to the right, from its position, until the first un-bracketed/parenthesized separator, unmatched close bracket or close parenthesis, or semicolon. This precedence ONLY applies within the brackets/parenthesis containing it
- ^ There is no Short Circuiting of Logical Operators in LSL, both operands will be evaluated regardless.
Logical Operators
Logical Operators are operators those result is either TRUE or FAlSE.
- insert truth tables
Bitwise Operators
Bitwise Operators are similar to Logical Operators, but act on all bits of an integer simultaneously as if they were each a Boolean value.
- flesh this out